There's a "basedOn" property.  I think it means that a state, when
un-done, will only rollback to the basedOn state.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dennis Falling
Sent: Friday, July 11, 2008 10:13 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] So I guess I don't understand states

 

Not sure what you mean...I didn't research it beyond figuring out my
problem...  I had a viewstack with normal and no data views and wanted
it to stay the same (either in no data or normal) when going to the
updating/downloading state.  Was frustrated when my normal state was
inexplicably showing the no data view when it went to the updating
state.  I finally figured out it was undoing the current state (normal)
and reverting back to the previous values, which incidentally were
applied by the no data state.  Once I moved all the code to transitions
which are not undone, it worked fine.  My current understanding is that
anything you wish to be undone after you move to another state should be
done in states.  Any effect or permanent change should be done in
transitions.



On Fri, Jul 11, 2008 at 8:11 PM, Alex Harui <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

I don't use states much, but aren't there derived states so it will only
unplay to a certain point?

 

________________________________

From: flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com> ]
On Behalf Of Dennis Falling
Sent: Friday, July 11, 2008 1:46 PM
To: flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com> 
Subject: Re: [flexcoders] So I guess I don't understand states

 

Yeah, I didn't understand states.  Changing from one state to another
always unplays the properties and styles set in the previous state.  Not
a fan of that at all but that explains all my confusion.



On Tue, Jul 8, 2008 at 5:07 PM, dfalling <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

I thought I had states down pat until the last few days.

**States:**
normal state:
- change viewstack to show data renderers
no data state:
- change viewstack to show "no data" error view
fetching data state:
- <empty>

**Transitions:**
to fetching data state:
- display fetching data view
from fetching data state:
- hide fetching data view

My problem is that whenever I went into the fetchingData state, it
would properly perform the transitions for that state (showing the
fetching data view), but would also incorrectly perform whatever code
was inside the no data state. It also performed the code in the
fetching data state.

I created a function to watch the state changes and the no data state
was never being entered, but its properties were definitely being
applied.

I now have it working by doing everything in transitions, but does
anyone know why this problem would happen? I tried to write a small
sample app to demo this problem, but of course it worked fine.

Thanks

 

 

 

Reply via email to