Hi,

I think library needs to add all metadata or that will be lost in
compilation

-keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConst
ruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient;



El mar, 15 dic 2020 a las 0:49, Maria Jose Esteve (<mjest...@iest.com>)
escribió:

> Hi Carlos,
> These are the additional options I have:
>
> In the pom.xml of the library:
>
>           <additionalCompilerOptions>
>             -js-default-initializers=true;
>             -js-dynamic-access-unknown-members=true; <!-- to access JSON
> object graph subobjects -->
>             -source-map=true;
>             -keep-code-with-metadata=Inject;
>             -keep-as3-metadata+=Inject,EventHandler,Event,Bindable;
>           </additionalCompilerOptions>
>
> In the pom.xml of the consumer project:
>
>           <additionalCompilerOptions>
>               -js-default-initializers=true;
>               -js-dynamic-access-unknown-members=true; <!-- to access JSON
> object graph subobjects -->
>               -source-map=true;
>
> -compiler.exclude-defaults-css-files=MXRoyale-${royale.framework.version}-js.swc:defaults.css;
>
> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient;
>               -keep-code-with-metadata=Inject;
>               -show-binding-warnings=false;
>           </additionalCompilerOptions>
>
> How do you see them?
>
> Thx.
> Hiedra.
>
> -----Mensaje original-----
> De: Carlos Rovira <carlosrov...@apache.org>
> Enviado el: lunes, 14 de diciembre de 2020 15:09
> Para: Apache Royale Development <dev@royale.apache.org>
> Asunto: Re: Crux - RemoteObject do not conect to the backend within a
> Library
>
> Has your library the proper additional compiler options?
> You need to keep metadata there too.
>
> El dom, 13 dic 2020 a las 21:12, Maria Jose Esteve (<mjest...@iest.com>)
> escribió:
>
> > Hi Carlos,
> > No, I have it in the pom:
> >
> >           <additionalCompilerOptions>
> >               -js-default-initializers=true;
> >               -js-dynamic-access-unknown-members=true; <!-- to access
> > JSON object graph subobjects -->
> >               -source-map=true;
> >
> > -compiler.exclude-defaults-css-files=MXRoyale-${royale.framework.versi
> > on}-js.swc:defaults.css;
> >
> > -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDe
> > -keep-as3-metadata+stroy,ViewAdded,ViewRemoved,Bindable,Transient;
> >               -keep-code-with-metadata=Inject;
> >               -show-binding-warnings=false;
> >           </additionalCompilerOptions>
> >
> > Hiedra.
> >
> > -----Mensaje original-----
> > De: Carlos Rovira <carlosrov...@apache.org> Enviado el: domingo, 13 de
> > diciembre de 2020 20:39
> > Para: Apache Royale Development <dev@royale.apache.org>
> > Asunto: Re: Crux - RemoteObject do not conect to the backend within a
> > Library
> >
> > Maybe you need to add: *-js-default-initializers=true*
> >
> > check this:
> >
> > https://apache.github.io/royale-docs/create-an-application/optimizatio
> > ns/compiler-configuration-settings.html#default-initializers
> >
> > El dom, 13 dic 2020 a las 20:25, Maria Jose Esteve
> > (<mjest...@iest.com>)
> > escribió:
> >
> > > Hello, I am "studying" 😝 and I am facing a problem that I cannot
> > > solve
> > ...
> > > A simple example of authentication (sending credentials and
> > > receiving ok / nook message):
> > > - A view to enter loginname and password.
> > > - A model. LoginModel
> > > - A controller. LoginController
> > > - A delegate. LoginDelegate. A single method "login (username:
> > > String,
> > > pwd: String)"
> > > - An event. LoginSignInEvent.
> > > - ASP.Net Backend - AMF (FluorineFx endpoint) through "mx:
> RemoteObject".
> > > - In App.mxml is the definition and configuration of crux.
> > >
> > > The example works perfectly if the controller and the delegate are
> > > located in the same project as the views (App.mxml,
> > > MainContent.mxml) but if I put them in a library project it doesn't
> work:
> > > Requests from the view reach the controller and also the delegate
> > > BUT they don't reach the backend.
> > >
> > > The only prompt I get on the console, and it also occurs when
> > > everything works fine, is:
> > > [WARNING] getStaticConstantsByConvention :: the reflection target
> > > mx.rpc.remoting.mxml.RemoteObject was not Compiled with default
> > > initializers enabled
> > >
> > > Any idea where I can continue investigating?
> > > As always, any help will be super-welcome 😝
> > >
> > > Thank you all.
> > > Hiedra
> > >
> > >
> >
> > --
> > Carlos Rovira
> > Apache Member & Apache Royale PMC
> > *Apache Software Foundation*
> > http://about.me/carlosrovira
> >
>
>
> --
> Carlos Rovira
> Apache Member & Apache Royale PMC
> *Apache Software Foundation*
> http://about.me/carlosrovira
>


-- 
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira

Reply via email to