Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Proxy data  (Read 8915 times)
newtriks
Courseware Beta
Full Member
***
Posts: 23


 - newtriks
View Profile WWW Email
« 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
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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>
Logged
Pages: [1]
Print