How to tell when last stack closed

Phil Davis revdev at pdslabs.net
Wed Feb 21 00:00:00 EST 2007


Hi Bill,

Have you tried something like this in the standalone script?

on closeStackRequest
   get the openStacks
   filter it without the short name of me -- the standalone
   filter it without the short name of the owner of the target
   if it = empty -- the last stack is about to close
   then -- quit the app
     quit
   else -- let the target stack close
     pass closeStackRequest
   end if
end closeStackRequest


This is off the top of my head. If it doesn't work, maybe it will give you some 
ideas.

Phil Davis



Bill Vlahos wrote:
> I have a standalone which launches one or more stacks but then 
> disappears once they are opened.
> 
> The user can close the stacks when they are done but when the last open 
> stack is closed I want to quit the standalone too.
> 
> How can I tell when there are no daughter stacks open?
> 
> Bill



More information about the use-livecode mailing list