Hi,

I'm strangled with an issue.
I'm developing a wrapper for office.js (office web add-In).

I have this file OfficeAddIn.as in src root folder with the
following content:

package
{
import org.apache.royale.events.EventDispatcher;

/**
* @externs
*/
COMPILE::JS
public class OfficeAddIn extends EventDispatcher
{
/**
* <inject_script>
* var script = document.createElement("script");
* script.setAttribute("src", "resources/office/office.js");
* document.head.appendChild(script);
* </inject_script>
*/
public function OfficeAddIn(){}

public static function writeData():void {}
}
}

At runtime when I run the writeData method from actionscript code, I get
the following error: ReferenceError: Can't find variable: OfficeAddIn

It's not my first Royale wrapper and I copied from the first one.

Thanks in advance,
Hugo.

Reply via email to