When is suspendStack sent?

Bob Sneidar bobsneidar at iotecdigital.com
Fri Sep 21 19:04:11 EDT 2018


Hi Craig. No what I am doing is when suspendStack fires, I check a property in the current stack. If it is not "view" I pop a dialog (as sheet) alerting the user thet they have unsaved changes, then I go to the stack (otherwise it will navigate away which is what I am trying to prevent). 

I'm thinking I can use a send in time as it may be that going back to the stack while suspendStack is executing bay be borking the engine somehow. All kinds of nasties start happening, like if I navigate to the script editor under these circumstances, I seem to lose the ability to grad and drop script selections. One time typing in a field actually edited the script! 

Bob S

> On Sep 21, 2018, at 11:03 , dunbarxx via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi.
> 
> "...For instance, I can click the window of the mainstack while in a
> substack and I get the suspendStack message. Subsequent clicks however do
> NOT get sent."
> 
> Now I am not sure what you mean. If I have a mainstack with a suspendStack
> handler in the stack script, and one or more sub stacks, that handler will
> fire whenever I navigate among any of them. In your example above, you would
> have suspended the subStack when you clicked on the main stack. But repeated
> clicks in any one stack will not, as expected, fire that hander. There has
> been no navigation, and therefore no suspension.
> 
> But is that what you meant by "subsequent clicks", that is, subsequent
> clicks on the same stack?
> 
> In other words, is that handler in the message path of the stacks that you
> are navigating among? I have never seen any anomalies with that message
> during navigation from stack to stack, as long as the handler is in the
> message path.
> 
> Craig





More information about the use-livecode mailing list