Hi All,
I have a strange problem with images I am putting in a datagrid. I
have two columns in a datagrid populated with icons. I get the image
name from an xml file and use an itemrenderer to display the icons. In
creating the page everything works fine, but as soon as I move the
compiled files to another persons machine, or even a different
directory on my own, the images don't appear. When moving the files
I've checked to make sure the images are moved along with everything
else.

Here's the datagrid (for brevity I've only included the two columns):

<mx:DataGrid x="10" y="35" width="765" height="195" rowHeight="18"
                headerColors="[#ed8e5f, #ed8e5f]" headerHeight="20"
borderColor="#666666"   id="dgInvoiceResults"  selectedIndex="0"
wordWrap="false" alternatingItemColors="[#dddddd,#cccccc]"
textAlign="left" dataProvider="{invoicesXML.item}"
creationComplete="totalGrid()">
                <mx:columns>
                        
                        <mx:DataGridColumn headerText="!" dataField="indicator" 
width="30"
                                headerRenderer="comps.cmpHeaderRenderer"
                                itemRenderer="comps.invoices.indicator" />
                        
                        <mx:DataGridColumn headerText="Source" 
dataField="source" width="55"
                                headerRenderer="comps.cmpHeaderRenderer"
                                itemRenderer="comps.invoices.invSource"
                                />
                </mx:columns>
        </mx:DataGrid>
 and here are the two renderers:
Indicator:
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml";
        paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="2" 
        width="50" height="20" horizontalAlign="center" >
        <mx:Image source="../images/{data.indicator}" width="14" height="14"
left="5" toolTip="{data.alert}"/>
</mx:HBox> 

and invSource:

<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml";
        paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="2" 
        width="50" height="20" horizontalAlign="center" >
        <mx:Image source="../images/{data.invSource}" width="14" height="14"/>
</mx:HBox>  

Can anyone see why the images display correctly when in the same
directory as the source files but not when they are moved elsewhere?

Thanks,
Jack


Reply via email to