Hi, It may seem silly Hugo, but... how are you running it? under the website or directly accessing the html? I'm doing some wrappers like you and I'm having problems with the execution through localhost, it doesn't load the js. Maybe this is your problem.
Hiedra -----Mensaje original----- De: Hugo Ferreira <[email protected]> Enviado el: martes, 19 de octubre de 2021 2:49 Para: Apache Royale Development <[email protected]> Asunto: Strangled with a new Royale wrapper component 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.
