Björnke von Gierke wrote:
I seldom make applications, but I've run into these problems when I tried to make my first os x standalone this year:

1. command-q does never produce closestackrequest.

Right. CloseStackRequest is only sent when the user physically clicks the close box. It's the only way a script can know if the user does that.

2. closing the stack does leave the application running (as long as there is any other stack in memory).

Yes. Other things that will prevent quitting are 1) if there are any pending messages in the queue, and 2) if there are any active drivers that need to be unloaded (like revUnloadSpeech.)


Therefore I had to use three messages (reposted below). Please someone tell me that I missed the one correct message for intercepting quitting and saving a stack :(

I usually manage things on closeStack, though it depends on the stack setup. For stacks that have open substacks that always need to be closed, I do something like this in the main stack script:

on closeStack
 if the target is not me then pass closeStack
 repeat for each line L in the substacks of this stack
   close stack L
 end repeat
 save this stack -- the main stack (optional)
 if the environment <> "development" then quit
end closeStack

Closestack is always sent, whether the user clicks the close box, chooses "quit" or "close" from a menu, or when a script issues a quit command. If your main stack has only a single card, you could use a closeCard handler instead.

--
Jacqueline Landman Gay         |     [EMAIL PROTECTED]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to