I wouldn't expect the execution contexts to be in the list but it sounds like that's a result of the debugging process itself. Is it different if you just log it to the message box without the debugger?

get the recentCards
put it
... etc

Does the palette not appear anywhere in the list at all?
--
Jacqueline Landman Gay | [email protected]
HyperActive Software | http://www.hyperactivesw.com
On June 8, 2019 8:15:14 AM David Epstein via use-livecode <[email protected]> wrote:

Several people gave helpful replies to my question, including pointing out that this is a case of “resumeStack”, not “openCard”:


Is there some simple way that an openCard handler can branch based on what card it is coming from?


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. 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.


Jacqueline Gay suggested using the “recentCards” to determine what card the user is coming from. So I wrote this handler:


function resumedTheSameCard
 -- call this in a "resumeStack" handler.
-- returns true if palette "tTools" has just been active and the resumeStack message was received by the same card that had been active when that palette was activated. -- returns false if we are coming from a different card, either directly or with a palette activation in between.
 get the recentCards
if the long id of stack "tTools" is not in line 2 of it then return false -- nb should work even if palette "tTools" stack has several cards
 return line 1 of it = line 3 of it
end resumedTheSameCard


But this does not work. When I debug, I see that line 2 of the recentCards does not refer to a card on my palette stack (“tTools”); it refers instead to a card in the stack “Execution Contexts”.


Why is that LiveCode system stack appearing in the recentCards, and why is my palette not appearing there?


Many thanks.


David Epstein
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to