[flexcoders] Re: I can't understand pureMVC

2009-06-25 Thread vladakg85
Ok, problem solved, my friend with more experience help :) I made stupid mistake, I have wrong mapped User VO, instead this: [RemoteClass(alias="BL.User")] Now I have this: [RemoteClass(alias="DemoFluorine.BL.User")] Thats why service returned me ObjectProxy --- In flexcoders@yahoogroups.com, Si

[flexcoders] Re: I can't understand pureMVC

2009-06-24 Thread Teoti Graphix, LLC
> Yeh I heard about Flex wrapping results from certain remote requests > using the ObjectProxy class, cant remember why this happens but try > this and see what happens: If I remember correctly, it's due to the fact there is no typed class when the data comes in. The remote call returns a generic

Re: [flexcoders] Re: I can't understand pureMVC

2009-06-24 Thread Simon Bailey
Yeh I heard about Flex wrapping results from certain remote requests using the ObjectProxy class, cant remember why this happens but try this and see what happens: var user:User = ObjectProxy( event.result ).object_proxy::object; Cheers, S On 24 Jun 2009, at 13:23, vladakg85 wrote: I a

[flexcoders] Re: I can't understand pureMVC

2009-06-24 Thread vladakg85
I am trying whole morning, I try to cast it in everything :( From remote service I return object "User", same VO object like in flex application. But is this image below ok, becuse I don't see User object anywhere, this is my evt.result. http://img31.imageshack.us/img31/9747/debug2.jpg --- In

Re: [flexcoders] Re: I can't understand pureMVC

2009-06-23 Thread Simon Bailey
Something is wrong with your assigning the remote result to the data in your Proxy. The 'data' object has not been cast to User() and is instead typed as ObjectProxy? On 23 Jun 2009, at 16:15, vladakg85 wrote: http://img37.imageshack.us/i/debug1.jpg/ this is debug from mediator. loginUs

[flexcoders] Re: I can't understand pureMVC

2009-06-23 Thread vladakg85
http://img37.imageshack.us/i/debug1.jpg/ this is debug from mediator. loginUserData is always null :( --- In flexcoders@yahoogroups.com, Simon Bailey wrote: > > Debug man, check the datatype of the object coming back from your > remote request, maybe there is a problem with the cast. Is the O

Re: [flexcoders] Re: I can't understand pureMVC

2009-06-23 Thread Simon Bailey
Debug man, check the datatype of the object coming back from your remote request, maybe there is a problem with the cast. Is the Object from your remote result datatyped? Try assigning it to a var first and then debug to see if the cast works. If on debug you cast the result successfully

Re: [flexcoders] Re: I can't understand pureMVC

2009-06-23 Thread Simon Bailey
Also I would use the onRegister() method to setup your RemoteObject i.e. override public function onRegister(){ loginRemoteService = new RemoteObject("fluorine"); loginRemoteService.source = "BL.Sample"; loginRemoteService .LoginUserByEnteredData.addEventListener(ResultEvent.

[flexcoders] Re: I can't understand pureMVC

2009-06-23 Thread vladakg85
I tried this data = evt.result as User; and its not work. I also tried to send User data with notification, same again. LoginCommand [code] override public function execute(notification:INotification):void { var myUser:User = notification.getBody() as User;

Re: [flexcoders] Re: I can't understand pureMVC

2009-06-23 Thread Simon Bailey
In your onResult method try assigning the data like: data = evt.result as User; // cast result to a User Object and assign to data Then you need to either: a) Have you mediator access the loginUserData directly (you may need to set it up as Bindable and dispatch an updated event - see htt

[flexcoders] Re: I can't understand pureMVC

2009-06-23 Thread vladakg85
Hi, thank you so much, I did something that I was trying for whole month :( ddd :) But now I have one more problem, this one is small :) 1) I make remote call to .NET to login user, everything is fine retrive data, check if user exists its ok, data from service are in proxy, this is my code for