PureMVC Architects Lounge

Announcements and General Discussion => Getting Started => Topic started by: newtriks on September 10, 2007, 02:51:55



Title: Proxy data
Post by: newtriks on September 10, 2007, 02:51:55
Hi all, props to Cliff on this framework, it has opened the floodgates for my code in Flex and making my life a damn site easier.

So first a real simple question that is bothering me late night, due to hassle with ColdFusion I don't need to be sweating this simple issue, so I pose it to u guys:

I am parsing a ValueObject into a Proxy with a constructor similar to this

:
public function TemplateProxy()
{
super( NAME, new TemplateVO );

}

My question is to return data I use:

:
public function get template():TemplateVO
{
return data as TemplateVO;
}

I have a returned ValueObject from ColdFusion coming into the Proxy and am trying to work out how to use the event.result and assign it to the proxy template data.  Is it as simple as setting the data value of the class like below?

:
data  = event.result as TemplateVO
And if so then why the heck when I trace data is it returning back as null when event.result traces [object Object]???

Sorry if I am unclear, late night and all that jazz :)

Simon


Title: Re: Proxy data
Post by: puremvc on September 10, 2007, 05:47:25
Hey Simon,

I'd have to see the working example to be sure, but I'd suggest at this point abandoning 'trace' as a front line troubleshooting tool and opt for the debugger. Try setting a breakpoint on the line where the result comes back, and then single step through what it does with the data. Inspect all the relevant variables live on each step. That should tell you where the ball is being dropped.


-=Cliff>