OpenStack and mode

Klaus Major klaus at major-k.de
Thu Jun 24 07:11:31 EDT 2004


Bon jour Maxence,

> Hello,
>
> I have a problem with my application. I use the "on openStack" 
> function so
> that the application launches some process when starting. The problem 
> is
> that the process is also launched when I am in editable mode (why in
> editable mode are the instructions run ?). I tried to put a test :
>
> put the mode of this stack into p
> if (p <> 1) ...
>
> But when I build my executable and launch it, the mode ("p") has the 
> value
> 1 (edition). How is it possible ? What is the solution ? Please help 
> me.

 From the docs:

Mode

1: editable window
The stack is open and displayed in an editable window. A stack has this 
mode
if its style is "topLevel" or if it was opened with the topLevel 
command.

Looks like the term "editable" is a bit misleading...
It has nothing to do with the fact WHERE the stack is running: 
Standalone of Rev IDE!

A simple "go stack xyz" will always open that stack as "toplevel" 
unless you did not set the
"style" of that stack to something else like "palette" or "modeless"...

So if i understand you correctly, you want that handler ONLY to be 
executed in
the standalone?

In that case you could use "the environment":

if the environment <> "development" then
   ### the stack is running NOT in the Rev IDE!
    ### do your stuff here
end if

Drop a line if that is not what you were looking for ;-)

> Maxence BERNARD

Au revoir...

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list