A question about openCard

Klaus major-k klaus at major-k.de
Sun Jun 2 20:22:35 EDT 2019


Hi David,

> Am 03.06.2019 um 00:00 schrieb David Epstein via use-livecode <use-livecode at lists.runrev.com>:
> 
> Is there some simple way that an openCard handler can branch based on what card it is coming from?

checl "recentNames" in the dictionary, that may be what you are looking for.

> When a user goes to a different card in a stack, or to a different stack, I use an “openCard” handler to set things up.

Yep.

> But I do not want those actions taken if the user is merely “returning” to a card after using a palette tool, or after a palette tool has been opened.

Then the card will receive a "resumestack" (and "suspendstack"), but no "opencard" message.

> I’m not sure I understand the full range of events that “close” a card so that returning to it triggers “openCard.”  Does this happen if I set an insertion point or select text in an unlocked field in a palette, or the user types there?  Does it happen if I open a palette, or move a palette, or if the user clicks on the palette?

See above, resumestack/suspendstack are the messages you could check, if neccessary, in that case.

> Many thanks.
> 
> David Epstein

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list