The sample code is located below. I am trying to find a way to bind
dynamic attributes (when using Proxy class). I can't get the dynamic
properties to bind, any suggestions or help would be appreciated.
Renaun
Proxy Class:
package {
import flash.util.flash_proxy;
import flash.util.Proxy;
dynamic public class SomeClass extends Proxy {
public var _dynamicAttributeArray:Array;
public function SomeClass() {
_dynamicAttributeArray = new Array();
}
flash_proxy override function getProperty( name : * ) : * {
return _dynamicAttributeArray[ name ];
}
flash_proxy override function setProperty(name:*, value:*):void
{
_dynamicAttributeArray[ name ] = value;
}
}
}
Now if I have:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*"
creationComplete="initApplication()">
<mx:VBox width="100%" height="100%">
<mx:TextArea width="100%" height="50%" id="output" text="{
SomeClass(someClass).newAttribute }"/>
<mx:Button label="Change" click="someClass.newAttribute = '' +
new
Date();"/>
</mx:VBox>
<mx:Script>
<![CDATA[
import SomeClass ;
public var someClass:SomeClass;
public function initApplication()
{
someClass = new SomeClass();
someClass.newAttribute = "I am New";
//output.text = someClass.newAttribute;
}
]]>
</mx:Script>
</mx:Application>
--
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/