[flexcoders] itemRender Debug Warnings

2008-05-06 Thread jmfillman
Since implementing some itemRenderers, I've been getting warnings, in 
Debug mode, that read like this:

warning: unable to bind to property 'display' on class 'Object' (class 
is not an IEventDispatcher)

From what I've been able to find on the www, is that this is related to 
setting RemoteObject results to an array, like this:

myAC.source = event.result as Array;

Question is, how to I do this correctly to prevent all those warnings?



RE: [flexcoders] itemRender Debug Warnings

2008-05-06 Thread Tracy Spratt
Neither Array nor Object are bindable, they do not dispatch the
necessary events.  Wrap your Array in an ArrayCollection.

 

One other cause of this warning is when you have a bindable object that
you reference through a property typed as Object, as with selectedItem,
currentItem, data, getRepeaterItem(), etc.  In that case you can convert
or cast the Object to the true data type to prevent the warnings.

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Tuesday, May 06, 2008 6:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] itemRender Debug Warnings

 

Since implementing some itemRenderers, I've been getting warnings, in 
Debug mode, that read like this:

warning: unable to bind to property 'display' on class 'Object' (class 
is not an IEventDispatcher)

From what I've been able to find on the www, is that this is related to 
setting RemoteObject results to an array, like this:

myAC.source = event.result as Array;

Question is, how to I do this correctly to prevent all those warnings?