How to resume script execution in main stack after closing another stack?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Motifews1992
Posts: 1
Joined: Mon Jul 13, 2026 3:50 am

How to resume script execution in main stack after closing another stack?

Post by Motifews1992 »

I used the script from my main stack to open another stack, and then close it. How do I get the rest of the script to go back to using the main stack?
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: How to resume script execution in main stack after closing another stack?

Post by dunbarx »

Hi, if you are real.

Do you mean you closed the "other" stack, or the mainStack?

If the other stack, you need do nothing. The script will continue to run normally after that line. If you mean the mainStack, well that is different altogether.

Which?

Craig
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: How to resume script execution in main stack after closing another stack?

Post by richmond62 »

I used the script from my main stack to open another stack, and then close it.
Might that not mean "I used the script from my main stack to open a sub-stack, and then close it." ?

I assume (?) "close it" refers to the sub-stack and not the main stack.

IFF the OP is using a mainstack as an initial title-stack then I feel they have got the thing the wrong way round: they should open the mainstack invisibly, and launch a sub-stack with the title visibly, and on an end-user dismissing it, it should be made invisible and the mainstack should appear.

Mind you, that message 'smells' of a robot as I feel it is extremely unlikely that someone would post a question like that as their first post.
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: How to resume script execution in main stack after closing another stack?

Post by richmond62 »

Took me a bit longer than it should have: sequence in stack script of main stack.
Attachments
FlasherM.livecode.7z
Stack
(40.07 KiB) Downloaded 5 times
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: How to resume script execution in main stack after closing another stack?

Post by dunbarx »

Richmond.

What does your "Flash" stack do?

I believe the OP, if a real person (we have not yet heard back) asked about closing the other stack, not simply hiding it. Hiding does not impact a running handler at all. Closing definitely might.

It does not matter if that "other" stack is a subStack or not. In any case, if this is a real query, it was not clear which stack was to be closed while a handler was running. That question merits discussion.

Craig
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: How to resume script execution in main stack after closing another stack?

Post by richmond62 »

Which question?

'Close', as in CLOSE a stack, or hide it?

CLOSE which stack?

As I suspeck 'twas a bot . . . fairly kenspeckle to my mind. 8)
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: How to resume script execution in main stack after closing another stack?

Post by richmond62 »

on mouseUp
set the vis of stack "FlasherM" to true
close this stack
end mouseUp
Had you thocht for yin minute, instead o gang aal agley, you wid hae jaloused . . .

. . .eftir aal, its sair kenspeckle.

But, Oh, No: you had to get up on yer shanks and attack.

The FLASH STACK could be yaised for a Splash screen, forbye.
Attachments
FlasherM.livecode.7z
Stack
(40.09 KiB) Downloaded 5 times
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: How to resume script execution in main stack after closing another stack?

Post by dunbarx »

Richmond.

"D'ye mean me?"

A jaloused "close" meant close, no hide.

Craig
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10428
Joined: Fri Feb 19, 2010 10:17 am

Re: How to resume script execution in main stack after closing another stack?

Post by richmond62 »

I did. 8)

It was a pleasure (as always) sparring with ye. :lol:
Post Reply