Re: A question about openCard

2019-06-08 Thread David Epstein via use-livecode
Jacqueline is correct: if I’m not debugging, the execution contexts is not in the list of recentCards. But my palette still does not appear in the list of recentCards. Further testing reveals: although activating a palette triggers a resumeStack message, and leaving a palette triggers a

Re: A question about openCard

2019-06-08 Thread J. Landman Gay via use-livecode
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

Re: A question about openCard

2019-06-08 Thread David Epstein via use-livecode
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

Re: A question about openCard

2019-06-03 Thread Richard Gaskin via use-livecode
Simon Knight wrote: > "Is there some simple way that an openCard handler can branch based on > what card it is coming from?" > > My solution would be to give each card a customprop named say > “uCalledBy". Then when the app changes cards I set this prop e.g. > > Set the uCalledBy of Card 42 to

Re: A question about openCard

2019-06-03 Thread J. Landman Gay via use-livecode
Look at the recentCards. Line 2 is the card you came from. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com Is there some simple way that an openCard handler can branch based on what card it is coming from?

Re: A question about openCard

2019-06-03 Thread Bob Sneidar via use-livecode
ResumeStack can be tricky. For instance, if you are tracing a resumeStack handler to debug it, every time you click back on to the stack in question, it will trigger the debugger and suspend the stack again! Rinse and repeat until you realize you can't trace a resumeStack handler without some

Re: A question about openCard

2019-06-03 Thread hh via use-livecode
> David E. wrote: > Is there some simple way that an openCard handler can branch based on > what card it is coming from? TMHO, the function that's made for that is the target (dictionary) Returns the object which received the message that started execution. Use the target function within a

Re: A question about openCard

2019-06-03 Thread Simon Knight via use-livecode
"Is there some simple way that an openCard handler can branch based on what card it is coming from?" My solution would be to give each card a customprop named say “uCalledBy". Then when the app changes cards I set this prop e.g. Set the uCalledBy of Card 42 to “HitchHikers” Go to Card 42

Re: A question about openCard

2019-06-02 Thread Klaus major-k via use-livecode
Hi David, > Am 03.06.2019 um 00:00 schrieb David Epstein via use-livecode > : > > 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