|
I
think I've already logged the bug for this (bug #84502) and it is addressedin
the doc in Creating Custom Components in Flash section as
follow:
If
your custom SWC has properties typed Array, do not use data-binding to supply
initial values
for that array properties. For example, if your custom SWC has a labels property which is typed Array, do not use data-binding in the MXML as shown below: <yourSWC labels={myArray}/> <mx:Script> <![CDATA[ var myArray=["cat", "dog", "bird"]; ]]> </mx:Script> The problem is that Flex instantiates the SWC before data binding occurs. Instead, you define the the array using the <mx:Array> tag, as the following example shows: <yourSWC> <labels> <mx:Array> <mx:String>cat</mx:String> <mx:String>dog</mx:String> <mx:String>bird</mx:String> </mx:Array> </labels> </yourSWC> Thank
you,
-Yukari
|
Title: Message
- RE: [flexcoders] Bindings and custom properties Dirk Eismann
- RE: [flexcoders] Bindings and custom properties Matt Chotin
- RE: [flexcoders] Bindings and custom properties Yukari Machiyama
- RE: [flexcoders] Bindings and custom properties Dirk Eismann
- RE: [flexcoders] Bindings and custom properties Matt Chotin

