Yes, I'm loading thru localhost.
I even have done code for debug purpose, to avoid the infamous cross domain
issue to be able to test on localhost.

It's an Web Add-In for MS Word and testing outside of localhost means that
every single change must the uploaded to a server.

I will test later load the Add-In from the server to confirm that this is
the issue.

Thank you for the tip.

Maria Jose Esteve <mjest...@iest.com> escreveu no dia terça, 19/10/2021
à(s) 08:57:

> 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 <hferreira...@gmail.com>
> Enviado el: martes, 19 de octubre de 2021 2:49
> Para: Apache Royale Development <dev@royale.apache.org>
> 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.
>

Reply via email to