Splash snafu

Trevor DeVore lists at mangomultimedia.com
Fri Dec 26 02:06:29 EST 2003


>> on LaunchProgram
>> 	close this stack
>> 	go "/data/program.rev" in new window
>> end LaunchProgram
>>
>>> My goal was to keep it safely running offscreen, deliberately to 
>>> prevent a
>>> user from closing it, and accidentally shutting down the app.
>> In this case you may want to just hide it or set the loc to some 
>> large negative number.  I *think* that if you use the method above 
>> then when the user closes program.rev the app would quit.
>
> on LaunchProgram
> 	go stack "/data/program.rev"
> 	close stack "the splash thingie"
> end LaunchProgram
>
> THIS will work ;-)
>
> Remember to provide the NAME of the standalone-stack!
> "THIS stack" would close the newly opened "/data/program.rev"
> immediately...
>
> I have been fooled by this a couple of times :-)

In the example you provide you do have to give the name of the stack.  
In the example I provided you don't.  'this' still refers to the splash 
stack since you haven't navigated to the new stack yet.  In my programs 
I set it up this way so that the code required one less hard coded 
name.

I mentioned moving the splash screen to a negative loc so that the 
executable would still remain open even if the main program stack was 
closed which seems to be what is desired.  That way you could have an 
application that would could have no visible stacks open but the 
program would still be running since the splash stack had not been 
closed.  This would be beneficial for something like a text editor on 
the Mac which remains open even if all documents are closed.

-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list