How to prevent a stack from loading twice (in Linux)

Peter Alcibiades palcibiades-first at yahoo.co.uk
Sat May 23 03:37:01 EDT 2009


Ken, the problem is, they can start a second copy of the app when one copy of
it is already running.  But the stack script contains the following:

on reloadStack
close this stack
end reloadStack

So should not that cause it to check and see if it is already running, and
if so quit?  I also have tried with just

on reloadStack
end reloadStack

But the second copy loads in either case.

What I want to happen is that if someone tries to start the app when it is
already running, for it to fail and not start.  Maybe give an error message,
but that's not essential.

Peter



Ken Ray wrote:
> 
>> How to do this?  I have tried to use onreloadStack, just trapping it in
>> the
>> stack script, but this seems to do nothing.  Even if the command is to
>> close the stack on reloadStack, it opens anyway.
>> 
>> The other one would be relaunch, but it seems to be Win only.
>> 
>> There was a thread and -- was it Richard Gaskin? someone talked about how
>> he always did this in the preliminaries to his stack opening.  Can't seem
>> to find it.
> 
> Sorry, Peter, but I'm not 100% sure what you're trying to do... are you
> trying to open a stack with "open stack" and it's opening twice? Or are
> you
> talking about the mainstack of a standalone... ? or something else?
> 
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-prevent-a-stack-from-loading-twice-%28in-Linux%29-tp23672383p23682071.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list