Multiple stacks

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
lcgrs
Posts: 19
Joined: Thu Sep 05, 2013 5:44 pm

Multiple stacks

Post by lcgrs » Wed Jan 14, 2015 9:41 pm

Hi,

I have three stacks, one main stack (stack 1) and two substacks (stack 2 and stack 3).
Stack 1 contains a button to open stack 2 and stack 2 contains a button to open stack 3.
I want stacks 2 and 3 to be modal - thats means that the user can't acces stack 2 when stack 3 is open (and can't access stack 1 when stack 2 is open).
I already worked out to have stack 2 to float above stack 1 and stack 3 to float above stack 1 and stack 2, my question: how can I prevent stacks 1 and 2 to have the modal als long as stack 3 is open?
Schermafbeelding 2015-01-14 om 21.38.10.png
Thanks!

Luc.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Multiple stacks

Post by jacque » Thu Jan 15, 2015 10:57 pm

Only one modal stack is typically open at a time, since modals are used for things that block all other actions until the user responds. Error dialogs are the most common use for modals, used when the app can't logically continue until the error situation is cleared. It isn't really appropriate to use them for any other purpose.

In this situation, use a script to determine which stack to open. You can check the openStacks function to see which stacks are open and the script can refuse to open any other stack until the first one is closed.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply