I will investigate all this possibilities.

Maria Jose Esteve <[email protected]> escreveu no dia terça, 19/10/2021
à(s) 11:18:

> Exactly, that's what happens to me when I launch against localhost, the js
> hasn't loaded yet but I don't know how to fix it. I tried monitoring the
> network and I see it loads but App loads before.... In theory the scripts
> inside the "body" shouldn't they run after all the js have loaded?
> I've tried to force it, with a custom loader in js but nothing worked,
> probably because I'm not doing it correctly :(
> Maybe there is a way to make App.start() wait until all the js are loaded?
>
> Hiedra
>
> -----Mensaje original-----
> De: Yishay Weiss <[email protected]>
> Enviado el: martes, 19 de octubre de 2021 12:05
> Para: [email protected]
> Asunto: RE: Strangled with a new Royale wrapper component
>
> *method later
>
> From: Yishay Weiss<mailto:[email protected]>
> Sent: Tuesday, October 19, 2021 1:04 PM
> To: [email protected]<mailto:[email protected]>
> Subject: RE: Strangled with a new Royale wrapper component
>
> Are you sure "resources/office/office.js" is being loaded in time? IIRC
> you can look in the html elements panel and look for the <script> element.
> Also, keep in mind that loading a script is an async operation so maybe
> calling the method layer will help?
>
> Just some quick thoughts.
>
>
>
> From: Hugo Ferreira<mailto:[email protected]>
> Sent: Tuesday, October 19, 2021 3:48 AM
> To: Apache Royale Development<mailto:[email protected]>
> Subject: 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.
>
>
>

Reply via email to