Thanks Ben.

I may be trying the wrong thing here, but this is the only working way I came up with:

<mx:XMLListCollection id="xlcReportGrid" source="{XMLList(cbReportInfoName.selectedItem.lineItems.columns.column)}"/>
and then the Text control that binds to it:
<mx:Text htmlText="{xlcReportGrid.getItemAt(0).content}" />

cbReportInfoName is a dropdown combo (the last in a chain) that gets its data from another combo which gets its data from an HTTPService (e4x). It seems, whenever the data gets "thru" the dataprovider of a ComboBox, its selectedItem object is not a XMLListCollection anymore (I think this was different with an ArrayCollection - before I used e4x as resultFormat from the HTTPService).

The problem with the above is that I cannot use the following (I would like to bind to nodes on different levels):

<mx:XMLListCollection id="xlcReportGrid" source="{XMLList(cbReportInfoName.selectedItem)}"/>
and then bind it like this:
<mx:Text htmlText="{xlcReportGrid.lineItems.columns.column.getItemAt(0).content}" />

This throws a compile error of "access to a possibly undefined property 'lineitems'..." Any ideas? thx -Iko


--- In flexcoders@yahoogroups.com, "ben.clinkinbeard" <[EMAIL PROTECTED]> wrote:
>
> XMLListCollection is the XML-based equivalent of ArrayCollection and
> provides a getItemAt() method as well.
>
> HTH,
> Ben
>
>
> --- In flexcoders@yahoogroups.com, "iko_knyphausen" iko@ wrote:
> >
> >
> > I am binding a text control to an XML (e4x) node via index. Looks
> > something like
> >
> > <mx:Text htmlText = "{myXml.myNodes[0].uniqueItem.toString()}" />
> >
> > This works well as a unidirectional binding from a data source, however,
> > the compiler throws a warning saying "Databinding will not be able to
> > detect changes when using square bracket operator. For Array please use
> > ArrayCollection.getItemAt()".
> >
> > I was looking for a method that would allow node access via index,
> > basically an equivalent of the getItemAt() method, but could not find
> > anything. Could not cast to mx.collections.ArrayCollection either.
> >
> > Has someone done this before? thx.
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to