It means your data objects are just plain objects and any changes to
type or name won't be detected.  You can make your object [Bindable] or
better yet, define a custom data class with the appropriate [Bindable()]
events, but I don' think these warning will harm you in this case
although it will slow down the app.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Dan Vega
Sent: Friday, July 25, 2008 6:45 AM
To: [email protected]
Subject: [flexcoders] DataGrid Row Icon

 

I am having an issue displaying an icon in the first column of a row.
Using the following code I pass two variables to a function the type and
name. The type lets me know if the current row is a Directory or a file,
if its a directory I return the source for the folder image, if its a
file I a parse the filename to get the extension and show that Icon. 

                <mx:DataGridColumn width="30" sortable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:Image
source="{outerDocument.setIcon(data.Type,data.Name)}" 
                                verticalAlign="middle"
horizontalAlign="center" scaleContent="false"/>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>


While this is working I keep getting the errors below.. Any help is
appreciated. 

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


Thank You
Dan Vega
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
http://www.danvega.org <http://www.danvega.org> 

 

Reply via email to