You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Maria Jose Esteve <mj...@iest.com> on 2020/12/13 19:25:15 UTC

Crux - RemoteObject do not conect to the backend within a Library

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


RE: Crux - RemoteObject do not conect to the backend within a Library

Posted by Maria Jose Esteve <mj...@iest.com>.
I'm "catching up" with mvc forgive me if I say something "too wrong". Almost all communication between my controllers and views, as you say, is done through the binded variables of the model, but on occasion I have preferred to dispatch a response event.
I will be debugging my mental "mvc", hahahaha, but it is that between MVC, PAIG and all the changes of the last year I am a little slow.

In any case, as I mentioned in the other email, my problem was solved as soon as I added the complete metadata.

The waring of the mx.RemoteObject has always occurred to me but everything works as I expect; Yes it is true that if I change the object for an HTTPService, the warning becomes an error (Connection tests with a REST API) but THIS is another WAR.

Thanks Carlos.
Goodnight.

Hiedra.

-----Mensaje original-----
De: Carlos Rovira <ca...@apache.org> 
Enviado el: martes, 15 de diciembre de 2020 13:28
Para: Apache Royale Development <de...@royale.apache.org>
Asunto: Re: Crux - RemoteObject do not conect to the backend within a Library

In views the dispatcher use to be the application, and the event is bubbling until reach the app and then it's headed to the controller.
For Controller to View is not something that the MVC promote. The right way is controller change the model and then view updates through binding (check TodoMVC crux example).
So you are sending an event to the dispatcher (the main app) and there you'll be able to catch and process.

El mar, 15 dic 2020 a las 2:00, Maria Jose Esteve (<mj...@iest.com>)
escribi贸:

> Hello, I have made some progress ...
> The behavior described occurs for me with this architecture:
>         -> Application - PC1
>         -> Backend - PC2
> I remember behavior:
> Exe. OK) All code in the same project.
> Exe. NOT OK) Extracting the mc implementation to a library. We got to 
> send the request to the backend, from the delegate, but we did not 
> receive a response because we really "did not get to the back".
>
> Now, I have changed the architecture:
> -> Application - PC1
> -> Backend - PC1
> Exe. OK) All code in the same project. (Keep working fine)
>
> And also the location of the classes:
>         -> Application Project: "Views" and "Controller"
>         -> Project Library: "Model", "Event", "Delegate"
> And the behavior is different:
> Exe. NOT OK) We send to the backend and RECEIVE the response in the 
> controller BUT if the dispached of the response event towards the 
> "View" is never received:
>
> Controller:
>         protected function loginResHandler(event:ResultEvent):void
>         {
>                 dispatcher.dispatchEvent(new 
> LoginSignInEvent(LoginSignInEvent.EVENT_AUTEN_OK));
>         }
>
> Vista:
>         [EventHandler(event = "LoginSignInEvent. EVENT_AUTEN_OK 
> ",scope="global")]
>         public function loginComplete(event:LoginSignInEvent):void
>        {
>             trace('ok');
>         }
>
> Why do you think crux does not work with binding from controller to 
> view and from view to controller it does?
> On the other hand, I can't understand why if I change the backend to 
> the same IIS the behavior is different ...
>
> Thx.
> Hiedra.
>
> -----Mensaje original-----
> De: Maria Jose Esteve <mj...@iest.com> Enviado el: domingo, 13 de 
> diciembre de 2020 20:25
> Para: dev@royale.apache.org
> Asunto: Crux - RemoteObject do not conect to the backend within a 
> Library
>
> 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

Re: Crux - RemoteObject do not conect to the backend within a Library

Posted by Carlos Rovira <ca...@apache.org>.
In views the dispatcher use to be the application, and the event is
bubbling until reach the app and then it's headed to the controller.
For Controller to View is not something that the MVC promote. The right way
is controller change the model and then view updates through binding (check
TodoMVC crux example).
So you are sending an event to the dispatcher (the main app) and there
you'll be able to catch and process.

El mar, 15 dic 2020 a las 2:00, Maria Jose Esteve (<mj...@iest.com>)
escribi贸:

> Hello, I have made some progress ...
> The behavior described occurs for me with this architecture:
>         -> Application - PC1
>         -> Backend - PC2
> I remember behavior:
> Exe. OK) All code in the same project.
> Exe. NOT OK) Extracting the mc implementation to a library. We got to send
> the request to the backend, from the delegate, but we did not receive a
> response because we really "did not get to the back".
>
> Now, I have changed the architecture:
> -> Application - PC1
> -> Backend - PC1
> Exe. OK) All code in the same project. (Keep working fine)
>
> And also the location of the classes:
>         -> Application Project: "Views" and "Controller"
>         -> Project Library: "Model", "Event", "Delegate"
> And the behavior is different:
> Exe. NOT OK) We send to the backend and RECEIVE the response in the
> controller BUT if the dispached of the response event towards the "View" is
> never received:
>
> Controller:
>         protected function loginResHandler(event:ResultEvent):void
>         {
>                 dispatcher.dispatchEvent(new
> LoginSignInEvent(LoginSignInEvent.EVENT_AUTEN_OK));
>         }
>
> Vista:
>         [EventHandler(event = "LoginSignInEvent. EVENT_AUTEN_OK
> ",scope="global")]
>         public function loginComplete(event:LoginSignInEvent):void
>        {
>             trace('ok');
>         }
>
> Why do you think crux does not work with binding from controller to view
> and from view to controller it does?
> On the other hand, I can't understand why if I change the backend to the
> same IIS the behavior is different ...
>
> Thx.
> Hiedra.
>
> -----Mensaje original-----
> De: Maria Jose Esteve <mj...@iest.com>
> Enviado el: domingo, 13 de diciembre de 2020 20:25
> Para: dev@royale.apache.org
> Asunto: Crux - RemoteObject do not conect to the backend within a Library
>
> 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

RE: Crux - RemoteObject do not conect to the backend within a Library

Posted by Maria Jose Esteve <mj...@iest.com>.
Hello, I have made some progress ...
The behavior described occurs for me with this architecture:
	-> Application - PC1
	-> Backend - PC2
I remember behavior:
Exe. OK) All code in the same project.
Exe. NOT OK) Extracting the mc implementation to a library. We got to send the request to the backend, from the delegate, but we did not receive a response because we really "did not get to the back".

Now, I have changed the architecture:
-> Application - PC1
-> Backend - PC1
Exe. OK) All code in the same project. (Keep working fine)

And also the location of the classes:
	-> Application Project: "Views" and "Controller"
	-> Project Library: "Model", "Event", "Delegate"
And the behavior is different:
Exe. NOT OK) We send to the backend and RECEIVE the response in the controller BUT if the dispached of the response event towards the "View" is never received:

Controller:
        protected function loginResHandler(event:ResultEvent):void 
        {
                dispatcher.dispatchEvent(new LoginSignInEvent(LoginSignInEvent.EVENT_AUTEN_OK));
        }

Vista:
        [EventHandler(event = "LoginSignInEvent. EVENT_AUTEN_OK ",scope="global")]            
        public function loginComplete(event:LoginSignInEvent):void
       {
            trace('ok');
        }

Why do you think crux does not work with binding from controller to view and from view to controller it does?
On the other hand, I can't understand why if I change the backend to the same IIS the behavior is different ...

Thx.
Hiedra.

-----Mensaje original-----
De: Maria Jose Esteve <mj...@iest.com> 
Enviado el: domingo, 13 de diciembre de 2020 20:25
Para: dev@royale.apache.org
Asunto: Crux - RemoteObject do not conect to the backend within a Library

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


RE: Crux - RemoteObject do not conect to the backend within a Library

Posted by Maria Jose Esteve <mj...@iest.com>.
Carlos, This has been the solution.

Now I have it totally separated: views in the main project and the others in the library.



Thank you, you are always there 馃槤

(I will look for detailed information about this parameter)



Thx.

Hiedra.



-----Mensaje original-----
De: Carlos Rovira <ca...@apache.org>
Enviado el: martes, 15 de diciembre de 2020 13:23
Para: Apache Royale Development <de...@royale.apache.org>
Asunto: Re: Crux - RemoteObject do not conect to the backend within a Library



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 (<mj...@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.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>

>

> How do you see them?

>

> Thx.

> Hiedra.

>

> -----Mensaje original-----

> De: Carlos Rovira <ca...@apache.org>> Enviado el: lunes, 14 de

> diciembre de 2020 15:09

> Para: Apache Royale Development <de...@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

> (<mj...@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.ver

> > si

> > on}-js.swc:defaults.css;

> >

> > -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,Pre

> > -keep-as3-metadata+De

> > -keep-as3-metadata+stroy,ViewAdded,ViewRemoved,Bindable,Transient;

> >               -keep-code-with-metadata=Inject;

> >               -show-binding-warnings=false;

> >           </additionalCompilerOptions>

> >

> > Hiedra.

> >

> > -----Mensaje original-----

> > De: Carlos Rovira <ca...@apache.org>> Enviado el: domingo, 13

> > de diciembre de 2020 20:39

> > Para: Apache Royale Development <de...@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/optimizat

> > io ns/compiler-configuration-settings.html#default-initializers

> >

> > El dom, 13 dic 2020 a las 20:25, Maria Jose Esteve

> > (<mj...@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

Re: Crux - RemoteObject do not conect to the backend within a Library

Posted by Carlos Rovira <ca...@apache.org>.
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 (<mj...@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 <ca...@apache.org>
> Enviado el: lunes, 14 de diciembre de 2020 15:09
> Para: Apache Royale Development <de...@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 (<mj...@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 <ca...@apache.org> Enviado el: domingo, 13 de
> > diciembre de 2020 20:39
> > Para: Apache Royale Development <de...@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
> > (<mj...@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

RE: Crux - RemoteObject do not conect to the backend within a Library

Posted by Maria Jose Esteve <mj...@iest.com>.
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 <ca...@apache.org> 
Enviado el: lunes, 14 de diciembre de 2020 15:09
Para: Apache Royale Development <de...@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 (<mj...@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 <ca...@apache.org> Enviado el: domingo, 13 de 
> diciembre de 2020 20:39
> Para: Apache Royale Development <de...@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 
> (<mj...@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

Re: Crux - RemoteObject do not conect to the backend within a Library

Posted by Carlos Rovira <ca...@apache.org>.
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 (<mj...@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.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>
>
> Hiedra.
>
> -----Mensaje original-----
> De: Carlos Rovira <ca...@apache.org>
> Enviado el: domingo, 13 de diciembre de 2020 20:39
> Para: Apache Royale Development <de...@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/optimizations/compiler-configuration-settings.html#default-initializers
>
> El dom, 13 dic 2020 a las 20:25, Maria Jose Esteve (<mj...@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

RE: Crux - RemoteObject do not conect to the backend within a Library

Posted by Maria Jose Esteve <mj...@iest.com>.
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.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>

Hiedra.

-----Mensaje original-----
De: Carlos Rovira <ca...@apache.org> 
Enviado el: domingo, 13 de diciembre de 2020 20:39
Para: Apache Royale Development <de...@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/optimizations/compiler-configuration-settings.html#default-initializers

El dom, 13 dic 2020 a las 20:25, Maria Jose Esteve (<mj...@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

Re: Crux - RemoteObject do not conect to the backend within a Library

Posted by Carlos Rovira <ca...@apache.org>.
Maybe you need to add: *-js-default-initializers=true*

check this:
https://apache.github.io/royale-docs/create-an-application/optimizations/compiler-configuration-settings.html#default-initializers

El dom, 13 dic 2020 a las 20:25, Maria Jose Esteve (<mj...@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