I might be wrong but I think it's something to do with the way things are inialized. trying setting the "creationPolicy" to "all" like this
 
<mx:ViewStack id="viewstack1" creationPolicy="all">
 
but don't set it on your childs. I've not tried this... for some reason my browser keeps crashing everytime I try run Flex apps in debug mode... dunno why. Just a warning though.... if you have alot of view stacks... having "creationPolicy" set to "all" will slow your application load time down ( only when it firsts gets initalized then after it's all nice n fast :p )
 
hope this helps ;)


 
On 3/23/06, Colin Wiseley <[EMAIL PROTECTED]> wrote:

Hi, I have a bug that I've noticed with the recent release of Flex 2 Beta 2.  The show event is not being dispatched when an item in a ViewStack becomes visible for the first time.  This problem was not present in Beta 1.

 

You can use the code below to reproduce the problem.  Run the application in Debug Mode and you'll see that the trace statement does not get displayed until the second time that you click the Forward button.

 

Is there a workaround for this or do I need to wait for Beta 3?  Thanks!

 

 

<?xml version="1.0"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml " backgroundColor="#FFFFFF">

      <mx:ViewStack id="viewstack1">

            <mx:Canvas label="View 1" width="100%" height="100%">

                  <mx:Button x="57" y="69" label="Forward" click="{viewstack1.selectedIndex = 1}"/>

            </mx:Canvas>

            <mx:Canvas label="" width="100%" height="100%" show="{trace('Show Called')}">

                  <mx:Button x="57" y="69" label="Back" click="{viewstack1.selectedIndex = 0}"/>

            </mx:Canvas>

      </mx:ViewStack>

 

</mx:Application>

 

Colin Wiseley 

 



--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






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




YAHOO! GROUPS LINKS




Reply via email to