FlexPDX

A Portland, OR. Adobe Flex User Group

Hello everyone...
I'm glad to find other Flex developers in my local area and hope someone can shed some light on an issue I'm having with a current project:

I'm using an XML document as my data source and trying to set up bindings between display controls and the data. When the XML source is returned from an HTTPService call, specifying E4X resultFormat, I hold it in an XML typed var.

There are 10 repeating nodes, with each of those having 4 children, and each of those having an additional 4 children, like so: http://nwlearning.com/data.xml

The problem I'm having is figuring out why Flex displays warnings about:
Data binding will not be able to detect changes to XMLList "subskill", need an XML instance (when I've typed the object as an XML instance)

Data binding will not be able to detect changes when using square bracket operator, use Array

Yet, when I restructure the XML to point at an XML representation of the data, it warns:
Data binding will not be able to detect changes, XML class is not IEventDispatcher

I tried to get around the Array bracket notation by restructuring the XML data to include an attribute to refer to, but that didn't eliminate the Array notation warning.

In other Flex applications, I've use a data model as the destination in conjunction with form based controls binding to the model as well, which worked (the changed data was able to be detected and passed back to server scripts)... but the warnings in that application included the 'not an IEventDispatcher'

I've tried using XMLList and XMLListCollection as well, with no change in behavior...

what am I missing?

thanks in advance for any reponses
Dan

Share

Reply to This

Replies to This Discussion

Dan,

Your XML data needs to be in an IEventDispatcher form. To do this, you wrap your data in what is called an Item Renderer. For "how to" details, see:

Flex 2 Developer's Guide > Customizing the User Interface > Using Item Renderers and Item Editors

Pete

Reply to This

is your variable subskill bindable?

do you initialize it like this?

[Bindable] var subskill:XMl;

?

Reply to This

Yes, that is correct.

Pete

Reply to This

thanks guys...
I'll review the Bindable status on that project in the next several days... right now I'm up to my armpits in getting two Flex based projects out the door and into production...

really appreciate the input <8-)

Reply to This

I'm sorry,

I read the initial post wrong. I stopped reading after I read "cannot bind to" and just assumed you were not setting your dataprovider to [Bindable].

You could extend the XML class and implement Ieventdispatcher interface.

You could name the class XMLIED, but then that class would always be dishonest.... :)

Reply to This

RSS

Badge

Loading…

© 2009   Created by Integranium on Ning.   Create a Ning Network!

Badges  |  Report an Issue  |  Privacy  |  Terms of Service