2 Replies Latest reply on Nov 8, 2010 10:05 AM by Alex Uhlmann

    Help getting started with wizard navigation

    Stenrap2 Level 1

      Hi,

       

      I'm using Cairngorm/Parsley and Flash Builder for the first time--excited to try MVC! I'm building an AIR application that starts with a very simple wizard (just two paths):

       

      1. Select the first radio button > click "Next" > type a URL > click "Finish".

      2. Select the second radio button > click "Next" > type the path to a file >  click "Finish".

       

      I'm not sure I need a wizard, but I want to follow Cairngorm rules and keep my objects as decoupled as possible. Here are my questions:

       

      1. Should I even use a wizard? If not, which layer should handle the showing and hiding of my controls (presentation, application, domain)?

       

      2. If I should use a wizard, are the  waypoints (except the current) simply invisible until reached? If so, how does the wizard make them visible...or is there a way to animate the appearance of elements? (I'd like to use greensock.)

       

      3. Can anyone point me to an example with source? The documentation seems to have a broken link:

       

      "For an extended API of Wizard, please find this example."

       

      Thanks,

      Rob

        • 1. Re: Help getting started with wizard navigation
          Stenrap2 Level 1

          I've realized that my question is a little more fundamental: If I need a component (e.g. button, label) to appear or disappear as a result of some user gesture, how do I avoid direct references to said component in my presentation model or other layers?

           

          I know, for example, I could bind a component's "visible" property to a Boolean in the model, but this seems pretty limiting (and since I'm a noob, it feels like a noobie kind of thing to do). What if I want to make the component disappear with a fade effect using TweenMax?

          • 2. Re: Help getting started with wizard navigation
            Alex Uhlmann Level 3

            You could just keep the state in the i.e. Presentation Model represented as i.e. a Bindable String property. Then, your component would bind it's currentState property to it and you could add effects via Transitions of the Flex effects framework. Another approach is to use i.e. the Observer library to listen to a state change of a behaviour object and then call an effect that's defined in your component. Hope this helps.