I'm pretty keen on wrapping all view changes in a state. Even if you use a viewstack, as Matt said, you can have a state which sets that selectedIndex. The nice thing about doing that is you have a simple abstraction, which lets you ditch the viewstack at a later date, and just change your state code. It also gives you one place to handler transitions, instead of having to specify show/hideEffect for you viewstack views, which makes things a lot more consistent and easier to follow.

Peter


On 5/3/06, Rick Schmitty <[EMAIL PROTECTED]> wrote:
Thanks Matt that helped!

On 5/2/06, Matt Chotin <[EMAIL PROTECTED]> wrote:
> I think it's often a style preference.  I tend to think of a viewstack
> as being useful when you want to replace a whole section.  Look at view
> 1.  Now look at view 2.  States are better for modes of a component, now
> we're in expanded view, now we're in thumbnail view.  As soon as you
> want the same component moving around I think you'll use a state.  In
> some cases I might have a state for the larger component where one of
> the things I'll change in the state is the selectedIndex of a ViewStack
> :-)
>
> I think it's going to take the community some time to use the features
> before coming up with a best practice pattern of where you would use one
> over the other.
>
> Matt
>
> -----Original Message-----
> From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
> Behalf Of Rick Schmitty
> Sent: Tuesday, May 02, 2006 8:49 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] mx:states vs mx:viewstack when and which?
>
> Hello, I've seen some examples with Cairngorm using either states or a
> viewstack to display the current screen.  I was wondering what were
> the advantages/disadvantages and when you should use one over the
> other?  Seems like both can have the current view bound to a selection
>
> thanks
>
>
> --
> 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
>
>
>
>
>
>
>
>
> --
> 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
>
>
>
>
>
>
>


--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/






--
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




Reply via email to