3 Replies Latest reply on Mar 29, 2012 10:02 AM by Flex harUI

    ViewStack with multiple mx:Modules

    kkudiksx

      Hi

       

      I am trying to upgrade a project from Flex 3.4 to Flex 4.5.

       

      The project uses a number of technologies, such as Cairngorm, Parsley.

       

      I've already done an upgrade on a different project so I am a bit aware of which versions need to go with what.

       

      So the problem I'm facing is as follows:

       

      I have an mx:ViewStack which contains a few cairngorm ViewLoaders.

       

      This custom made ViewStack is created programatically on creationComplete of the parent container (let's call it Parent) and added as a child to a (Parent's child)

       

      So the configuration is as follows:

       

      - Parent

        -- HBox (parent of viewstack), with id="viewStackContainer"

            --ViewStack is added programatically as a child to the HBox ("viewStackContainer") on Parent's creationComplete

              -- Cairngorm Module A

              -- Cairngorm Module B

              --  Cairngorm Module C

              -- etc

       

      In Flex 3,  this would work fine, and only the first child of the ViewStack would be loaded.

      A click on the ToggleButtonBar for the Module B would *load module B at that point*, a click on the ToggleButtonBar for the Module C would *load module C at that point*

       

      In Flex 4.5...what I'm observing is that all modules are created at once even if the user has not clicked on the ToggleButtonBar to go to that view/module.

       

      I've set the creationPolicy of the ViewStack to "auto" but it hasn't helped.

       

       

      Is this a known bug...or am I missing something? 

       

      Thanks!