Multiple windows

Sarah Reichelt sarahr at genesearch.com.au
Mon Jan 7 20:10:01 EST 2002


Thanks for the help, Shao & Andu. In case anyone else has the same
requirements, here is what I have ended up with:

In my main file, I have a main stack and a "Clone" stack. The Clone stack is
never actually opened but is only a template for new stacks.

On the main stack, I have buttons with various names that all use this
script:

on mouseUp
  cloneStack the short name of me
end mouseUp  

The cloneStack handler is in the stack script of my main stack:

on cloneStack newName
  if (newName is among the lines of the openStacks) then
    go to stack newName in a new window
  else
    clone stack "Clone"
    set the name of stack "Copy of Clone" to newName
  end if
end cloneStack

The original "Clone" stack is set to destroyStack & destroyWindow as these
copies are for temporary displays only. This means that they disappear
whenver their windows are closed and don't get saved with the rest. (Note:
the Application Overview needs to be closed & re-opened before it stops
showing "destroyed" stacks.)

Sarah




More information about the use-livecode mailing list