--- In [email protected], Stephen Allison <[EMAIL PROTECTED]>
wrote:
>
> > i'm trying to bind an associative array to some component property,
> You can get close-ish using ObjectProxy:
> 
> [Bindable] var p:ObjectProxy;
>               
> function init() {
>                               
>       var obj:Object = {name: "alice" };
>       p = new ObjectProxy(d);
>                               
> }
> ...
> <mx:Label text="name is {p.name}" />
> <mx:Button click="p.name='bob' " />
> 
> ObjectProxy wraps 'obj' and intercepts any attempt to get/set/call  
> anything on it.  Crucially, when a property is set on ObjectProxy it  
> fires a PropertyChange event, which is what a data binding looks for  
> as the signal to update.  While this will work with dynamic  
> properties using the normal '.' accessing syntax, I don't think  
> this'll work if you use the square bracket notation (perhaps someone  
> more knowledgable could tell us why?)
> 
> Stephen
>

Thanks both.
My objective was just that, bind to an associative array indexed by
some key...

Because the square bracket notation doesn't work I'm  going to try the
arieljake approach.

Cheers.

Reply via email to