Hi All,

Does anyone know how to access real object being proxied via 
mx.utils.ObjectProxy? There is ObjectProxy.object property, but it's 
only visible in the debugger watch. The follwoing test case 
outputs "Real object: null". Is it correct behaviour?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"; 
xmlns="*" creationComplete="testProxy()">
<mx:Script><![CDATA[

import mx.utils.ObjectProxy;    
import mx.controls.Alert;
private function testProxy():void
{
        var o1:Object = { f1:"aaa", f2:123 };
        var o2:Object = new ObjectProxy(o1);
        var o3:Object = ObjectProxy(o2).object;
        Alert.show("Real object: "+o3);
}               
]]></mx:Script></mx:Application>

--
Thanks,
Vadim Melnik.







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to