Thank you Doug! That fixed it.

--- In [email protected], "Doug McCune" <[EMAIL PROTECTED]> wrote:
>
> The issue is that you are creating Objects and adding these Objects 
to your
> dataprovider. Objects are not bindable. For a quick fix just do 
this:
> 
> var objDG:Object = {itemID: myID, index: myAC[myID].id, display:
> gridDisplay, toolTip: tipText};
> 
> myList.dataProvider.addItem( new ObjectProxy(objDG) );
> 
> But it would be much better to get strongly-typed objects back 
gfrom the
> server, or convert the items to strongly-typed objects instead of 
generic
> Objects. So define a class called MyItem (or whatever) and make it 
a simple
> class with bindable properties for itemID, index, display, and 
toolTip. THen
> when you get your objects back from the server do this instead:
> 
> var objDG:MyItem = new MyItem();
> obj.itemID = myID;
> obj.index = myAC[myID].id
> obj.display = gridDisplay;
> obj.toolTip = tipText;
> 
> BTW, I'd argue that storing the index of the item in the collection 
doesn't
> belong in the item itself..
> 
> Doug
> 
> myList.dataProvider.addItem( new ObjectProxy(objDG) );
> 
> 
> On Thu, Jun 26, 2008 at 4:16 PM, Enjoy Jake <[EMAIL PROTECTED]> wrote:
> 
> >   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<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.
> >
> >
> >  
> >
>


Reply via email to