I thought you were talking about a data object sent over RemoteObject

RemoteObject is dynamic, but is Proxy based so it has rules on what and how you 
can add things to it.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of ilikeflex
Sent: Friday, October 09, 2009 9:42 AM
To: [email protected]
Subject: [flexcoders] Re: dynamic class | add property runtime



Hi

var remoteOject:RemoteObject = new RemoteObject()
remoteOject.title = INCORRECT_STK_COMP;
remoteOject.getIncorrectStkCompIndexList.addEventListener(ResultEvent.RESULT,openIncorrectParamsResult);
remoteOject.getIncorrectStkCompIndexList();

Compile time "No Error"

RunTime Error:

Error: Cannot assign operations into an RPC Service (title)

at 
mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy::setProperty()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractService.as:282]

at 
com.sandp.grip.view.app.screen.dashboardtab::IndexProfileBase/openIncorrectTimings()[D:\eclipse\flexworkspace\grip-console\grip\src\com\sandp\grip\view\app\screen\dashboardtab\IndexProfileBase.as:143]

at 
com.sandp.grip.view.app.screen.dashboardtab::IndexProfileHorizental/___IndexProfileHorizental_Label24_click()[D:\eclipse\flexworkspace\grip-console\grip\src\com\sandp\grip\view\app\screen\dashboardtab\IndexProfileHorizental.mxml:369]

thanks
ilikeflex

--- In [email protected], Alex Harui <aha...@...> wrote:
>
> Yeah, that should work. What error do you get? How did you define the class?
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of ilikeflex
> Sent: Friday, October 09, 2009 7:02 AM
> To: [email protected]
> Subject: [flexcoders] dynamic class | add property runtime
>
>
>
> Hi
>
> If i have any "public dynamic class" then i can add any property at run time.
>
> Correct me if i am not correct??
>
> But if i do the same for the RemoteObject. It does not give me error at 
> compile time but it gives me error at runtime.
>
> My understanding is that i s! hould be able to add the property at run time 
> since it is dynamic.
>
> Thanks
> ilikeflex
>

Reply via email to