personally, I leave States to component level 'dynamic Flexi-magik' and use Viewstacks for major view changes. Viewstacks just seem more appropriate for major view changes. States I leave to component changes, eg a edit vs view in a form or something like that. IIRC, States actually are more complicated in implementation too, in case that matters. I just think the intent of States was not application state, rather component state.
DK On Mon, Sep 1, 2008 at 1:56 PM, j301c <[EMAIL PROTECTED]> wrote: > I agree that states are probably a much better option than viewstacks > because they are more dynamic. I probably will consider doing this as > I move along for this reason. I guess I was just wondering if there > was a better way than using constants in the modellocator to bind what > state, or selected index, that a component is in. If I used states, am > I correct in saying I would still need to have a static variable in the > modellocator that each views state variable would have to bind to? I > am thinking there must be a better way to decouple the view from the > model in this instance. Thanks, I appreciate this great feedback. > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Justin > J. Moses" <[EMAIL PROTECTED]> wrote: > > > > For your application, have you considered separating your views within > > states, and only populate them on the "EnterState" event? You could > > employ modules that load up on that event, rather than preloading them > > with components. > > > > The advantage of using states is that when your user comes back to > > opened states, they show themselves as they were left. Although the > > obvious caveat is the memory they take up (which you'd need to analyse > > in the Flex Profiler - assuming ur using Flex Builder 3 Pro). > > > > You can create the states dynamically, say when your user logs in, to > > load up the modules that type of user might need. > > > > > -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?