Paul, I think your timer solution is probably best for this situation. Nathan Mynarcik Interactive Web Developer [email protected] 254.749.2525 www.mynarcik.com
-----Original Message----- From: Paul Andrews <[email protected]> Date: Mon, 18 Jan 2010 14:52:59 To: Flash Coders List<[email protected]> Subject: Re: [Flashcoders] Design pattern? John McCormack wrote: > The user may go for another button click as the timer ends. Well, maybe but it just means I save one time more often than I needed to. There's no chance of missing a save (except a small window when the user could just close the browser before a save has happened). > How about saving state when a non-button click occurs? I could do that, but I get nervous that a user may just close the browser window and the "next click" that might have saved state might never happen. It's unlikely, but the window for that is much bigger than with the timer. Paul > John > > Nathan Mynarcik wrote: >> Gotcha. That makes sense. ------Original Message------ >> From: Paul Andrews >> Sender: [email protected] >> To: Flash Coders List >> ReplyTo: Flash Coders List >> Subject: Re: [Flashcoders] Design pattern? >> Sent: Jan 17, 2010 2:36 PM >> >> Nathan Mynarcik wrote: >> >>> Why not just save the state when the user clicks? Each click can >>> then just >>> overwrite the last state. >>> >>> >> A lot of unnecessary traffic to and load upon the remote database >> server. >> >> Paul >> >>> -----Original Message----- >>> From: [email protected] >>> [mailto:[email protected]] On Behalf Of Paul >>> Andrews >>> Sent: Sunday, January 17, 2010 1:25 PM >>> To: Flash Coders List >>> Subject: [Flashcoders] Design pattern? >>> >>> I am building an interface where the user updates the interface >>> state by clicking buttons. When a button is clicked it changes >>> appearance to indicate the state change. >>> >>> For the purposes of my question imagine a button that first shows >>> "A" then when clicked changes to "B", then "C" and then "D". >>> Clicking when the button shows "D" moves the state back to "A". >>> >>> It may be that the user clicks at "A" and keeps on clicking until >>> they reach "D" - so we have a series of state changes - A->B->C->D >>> >>> The only thing that needs to be known is that the final state is >>> "D". So I need to save the update to "D", but not the intermediate >>> values. >>> >>> I am planning to run a timer that is reset on every click, so that >>> when the timer expires, the state is saved. The timer would only >>> then restart once clicking resumes. I would most likely also have a >>> maximum "wait" too. >>> >>> Is there an alternative pattern for this? >>> >>> Paul >>> >>> >>> _______________________________________________ >>> Flashcoders mailing list >>> [email protected] >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> >>> _______________________________________________ >>> Flashcoders mailing list >>> [email protected] >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> >> >> _______________________________________________ >> Flashcoders mailing list >> [email protected] >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> >> Nathan Mynarcik >> Interactive Web Developer >> [email protected] >> 254.749.2525 >> www.mynarcik.com >> >> _______________________________________________ >> Flashcoders mailing list >> [email protected] >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> >> > > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

