I'm not sure I understand what the problem is here, but if you're just looking
to get rid of the warning you can do
text="{Object(data).display}"
----- Original Message ----
From: Tracy Spratt <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, June 26, 2008 4:21:46 PM
Subject: RE: [flexcoders] Re: itemRender Debug Warnings
Dynamic objects, like that in the “data”
property are not bindable. I know how to handle that when I am dealing with
XML, but I think you have dynamic objects as items in your AC.
No warranty, but try:
text="{String(data. display)}"
Tracy
________________________________
From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf
Of jmfillman
Sent: Thursday, June 26, 2008 6:48
PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Re:
itemRender Debug Warnings
I totally missed the last post or two on this topic,
but I still need
to resolve this.
The full warning message looks like this, each time the itemRenderer
is used:
warning: unable to bind to property 'display' on class 'Object'
(class is not an IEventDispatcher)
warning: unable to bind to property 'toolTip' on class 'Object'
(class is not an IEventDispatcher)
The itemRenderer looks like this:
<mx:Canvas xmlns:mx="http://www.adobe. com/2006/ mxml"
width="80"
height="18" verticalScrollPolic y="off"
horizontalScrollPol icy="off" >
<mx:Label text="{data. display}" height="100% "
width="100%"
buttonMode=" true" fontSize="9"
color="#535353"
toolTip="{data. toolTip}" textAlign="center" />
</mx:Canvas>
My list is defined like this:
<mx:List id="lstD0" left="0" top="15"
right="0" bottom="0"
editable="false" horizontalScrollPol icy="off"
itemRenderer= "myComponents. myItemRenderer" dataProvider= "[]"/>
The data coming back from the RO call is assiged to the
ArrayCollection like this:
private function onResult(event: ResultEvent) :void {
myArrayColl. source = event.result as Array;
}
I loop through myArrayColl and addItems to the list dataProvider
based on certain criteria.