-
Strange error in Flex, but App runs rightly...
hi !
i have a error, but the process runs perfectly.
Here my aim :
i have a Hbox
inside, i have 7 List (each by day)
in each list, i place some item which means Event (yes i'm building a calendar)
each event is represented by a label (itemrender)
each event (so item , so label) have a height in ratio of the height of the List.
My problem, is, when there is not even, i have to place a item which height is equal to the main List !
then i do this :
Code:
...
<mx:HBox x="12" y="103" width="769" height="100%" id="semainier">
<mx:List id="liste_lundi" height="100%" fontSize="9" labelField="name" variableRowHeight="true" itemRenderer="bloc" width="100" click="liste_lundi_click()" />
<mx:List id="liste_mardi" height="100%" fontSize="9" labelField="name" variableRowHeight="true" itemRenderer="bloc" width="100"/>
<mx:List id="liste_mercredi" height="100%" fontSize="9" labelField="name" variableRowHeight="true" itemRenderer="bloc" width="100"/>
<mx:List id="liste_jeudi" height="100%" fontSize="9" labelField="name" variableRowHeight="true" itemRenderer="bloc" width="100"/>
<mx:List id="liste_vendredi" height="100%" fontSize="9" labelField="name" variableRowHeight="true" itemRenderer="bloc" width="100"/>
<mx:List id="liste_samedi" height="100%" fontSize="9" labelField="name" variableRowHeight="true" itemRenderer="bloc" width="100"/>
<mx:List id="liste_dimanche" height="100%" fontSize="9" labelField="name" variableRowHeight="true" itemRenderer="bloc" width="100"/>
</mx:HBox>
...
my itemrenderer :
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="{Number((data.color).replace('#','0x'))}" paddingBottom="0" paddingTop="0">
<mx:Label text="{data.name}" paddingBottom="0" paddingTop="0"
width="100%"
height="{data.duree_unite!=24?data.duree_unite*20:parent.parent.semainier.height}"
/>
</mx:HBox>
The error reported by Flex builder came from the instruction :
parent.parent.semainier.height
where i tell to the itemrenderer object (label) to have the same heigh of the List (first parent is the hbox,second one is the list!)
When i run, Flex builder said Error :
1119: Accès Ã* la propriété semainier peut-être non définie, via la référence de type static flash.display:DisplayObjectContainer.
in english (cause i'm french) :
Access to the property Semainier might be not defined throught the reference of type static flash.displayisplayObjectContainer
so, what to do ?
my application runs (my item take the right height) but Flex return a error (not the compiled swf)
how to manage that ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|