As you said that I started looking at it more and started to write a reply.
The item is declared bindable but when you are in the component it could not
see my variable because it was declared private. i declared the variable and
it works with no warnings now!


                <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>

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


On Fri, Jul 25, 2008 at 2:13 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

>    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:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Dan Vega
> *Sent:* Friday, July 25, 2008 6:45 AM
> *To:* flexcoders@yahoogroups.com
> *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]
> http://www.danvega.org
>
>  
>

Reply via email to