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 <[email protected]>
Enviado el: domingo, 13 de diciembre de 2020 20:25
Para: [email protected]
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