Restore Field Selections?

Ken Ray kray at sonsothunder.com
Sun Apr 9 14:19:12 EDT 2006


On 4/9/06 12:57 PM, "David Burgun" <dburgun at dsl.pipex.com> wrote:

> Hi,
> 
> Do I need to restore the field selection after switching cards?
> 
> I have a stack with two cards and in card 2 the user selects an item
> in a list field and it gets selected ok, they then switch to card 1
> and then back to card 2 but the current selection is lost when card 2
> re-appears. Is this the correct action? If so what is the best place
> to refresh the selection when switching cards?
> 
> preOpenCard? openCard? or somewhere else?

It depends on whether the rest of your card "resets" when you enter it for a
second time, or not. If it *does*, then don't worry about it, but if it
tries to keep data persistent, then store the hilitedLines in a custom
property, and then restore them on preopencard.


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list