Brennan:
Thank you very much. What do you mean by ViewHelper? Does each View in the ViewStack have a viewHelper?
Thanks
Sam
Sam
On 8/31/06, dreuimar <[EMAIL PROTECTED]> wrote:
I started out using states, with the current state being bound to a
property in the model (using Cairngorm.) Lately, as my application has
dozens of screens and different users are privelaged to have certain
screens at their disposal, I use a view stack (it's easier on the eyes
to program, IMO), and have each state's viewhelper extended to
register that given state as a screen object in an arraycollection of
available screens. I also have a constants file of screen titles (my
menu reflects the title of the current screen.)
I register each screen with its static title (pulled from the
constants class), and fire off a custom cairngorm event when switching
screens.
e.g.:
CairngormEventDispatcher.getInstance().dispatchEvent( new
ScreenSwitchEvent(Constants.MainMenu));
Then I have a class that implements Command and have it do a search in
the screen array for any object who's title is Constants.MainMenu.
I've found this to be the best way, mainly because I rely on
permissions and some screens have read-write access, some only have
read, etc.
For a smaller application, you could just use states and have a string
property in the model called currentState that the currentState of
your VBox is bound to. (I say VBox instead of application because I
want a menu bar to be at the top of every screen, so the content is
loaded into the vbox.) Then switching screens is as easy as calling:
model.currentState = Constants.MainMenu
Brennan
--- In flexcoders@yahoogroups.com, "Sam Shrefler" <[EMAIL PROTECTED]> wrote:
>
> I'm just looking for an theory overview / suggestions on how to handle
> multiple screens with nothing in common:
>
> For example, i have an application that I'd like to have a menubar
on every
> single screen.
> After that, i'd have say 5 - 20 totally unrelated screens each with
their
> own display and function.
> I see on each of those screens where viewStates would come in handy.
>
> My question is:
>
> Should I make viewStates for every single screen, or would using a
viewStack
> be better? Is there a best practice for an application with multiple
> screens?
>
> Thanks
>
> Sam
>
--
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
Software development tool | Software development | Software development services |
Home design software | Software development company |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___