PDA

View Full Version : XML XMLList and binding?


Mortimer Jazz
07-03-2006, 12:35 PM
I'm hoping someone can clear up this problem for me...

When i run the Tree example from the Flex2 docs, in Debug mode, i get the following error: "warning: unable to bind to property 'label' on class 'XML' (class is not an IEventDispatcher)". The Flex docs do also say "NOTE You currently cannot use a node within an <mx:XML> data model as a binding source".
http://127.0.0.1:64068/help/nftopic/com.adobe.flexbuilder.help/html/00001049.html#157222
(http://livedocs.macromedia.com/flex/2/langref/mx/controls/Tree.html)

Yet the example does seem to work, and the Tree is populated with the label values from the XMLList.

I have now just seen this in the docs:
"XML can be any of the following ... XML, XMLList, or XMLListCollection ... (These tags support data binding)
http://127.0.0.1:64068/help/nftopic/com.adobe.flexbuilder.help/html/00000510.html

I'm a bit confused.
Can anyone help clear this up for me?

hangalot
07-13-2006, 11:04 AM
ok, that would most prob be a one way binbding that also would not replect any changes made to the xml obkject at runtime in the tree. from my experience with the tree in 1.5 (hopefully its been improved) you need to reset the dataprovider the whole time (phleegh!)

Mortimer Jazz
07-13-2006, 11:09 AM
Cheers Hangalot

Doh, what a fool, I just realised I pasted the url to my local files, not the livedoc ones. :rolleyes: