Perhaps the problem is the default deferred instanition behavior of the accordion.

 

“v2” and its children do not exist until that view is displayed by the user.

 

For testing purposes only, try setting the accordion creationPolicy=”all”.

 

If that solves the problem, search this archive for the correct ways to handle this issue.

 

“Setting creationPolicy=”all” is almost never the correct thing to do in Flex” paraphrasing Gordon.

 

Tracy

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of dj
Sent: Wednesday, September 27, 2006 1:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HBox inside a vbox - inside an Accordion (possible bug)

 

I was having the damnest time adding a little thumbnail component to the
inside of a HBox -> inside a VBox -> inside an Accordion...

I had no problem as the code demonstrates inside the first vbox in my
accordion:

<mx:Accordion id="accordion0" width="334" height="180"
resizeToContent="true">
<!-- Define each panel using a VBox container. -->
<mx:VBox id="v1" label="Favorite Friends"
backgroundColor="#c0c0c0" width="100%" verticalScrollPolicy="off">
<mx:HBox x="100" y="100" width="600" height="280"
id="stack" verticalScrollPolicy="off" />
</mx:VBox>
<mx:VBox id="v2" label="{about_me}" width="100%"
height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">

<mx:HBox width="100%" height="100%" >
<mx:TextArea id="about_profile"
htmlText="{about_person}" x="0" y="0" width="100%" height="100%"
wordWrap="true" editable="false" fontSize="12" fontWeight="bold"
fontFamily="tres"/>
</mx:HBox>
</mx:VBox>
<mx:VBox id="v3" label="Favorites" width="100%" height="143">
<mx:Text id="favorites_" />
</mx:VBox>
</mx:Accordion>

But below when i try to do my method "stack" to create my component
inside my vbox ="v2", it says undefined object or refrence... null... i
*think* know i am doing this right, however flex can't find my component
ID or something -- why would this be?

<mx:Accordion id="accordion0" width="334" height="180"
resizeToContent="true">
<!-- Define each panel using a VBox container. -->
<mx:VBox id="v1" label="Favorite Friends"
backgroundColor="#c0c0c0" width="100%" verticalScrollPolicy="off">
<mx:HBox width="100%" height="100%" >
<mx:TextArea id="about_profile"
htmlText="{about_person}" x="0" y="0" width="100%" height="100%"
wordWrap="true" editable="false" fontSize="12" fontWeight="bold"
fontFamily="tres"/>
</mx:HBox>
</mx:VBox>
<mx:VBox id="v2" label="{about_me}" width="100%"
height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:HBox x="100" y="100" width="600" height="280"
id="stack" verticalScrollPolicy="off" />

</mx:VBox>
<mx:VBox id="v3" label="Favorites" width="100%" height="143">
<mx:Text id="favorites_" />
</mx:VBox>
</mx:Accordion>

Thanks,
Patrick

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to