Opening a stack *behind* another stack? (take 2)

Cubist at aol.com Cubist at aol.com
Fri Jan 23 07:50:21 EST 2004


   Okay, I hit the SEND key prematurely the first time I was replying to 
Doug's query...

sez doug:
>How would I specify that the newly opened stack is behind another stack?
   I'm not sure why you'd *want* a newly-opened stack to open up *behind* 
another stack, but the answer is: Fake it.

  lock screen
  push this card
  open stack "Fred"
  pop card
  unlock screen

   If you have more than one stack open, and you want to guarantee that the 
new stack will open up behind *all* of them, something like this might work...

  lock screen
  put the stacks into George
  open stack "Fred"
  repeat with K1 = 1 to the number of lines in George
    go stack (line K1 of George)
  end repeat
  unlock screen

   This latter snippet offers the possibility of controlling exactly where 
the newly-opened stack fits into the z-order of the stacks that are already 
opened -- move the "open stack Fred" line into the loop, bracketed by "if K1 = 
DerNumber then" and "end if". I have no idea why you'd want to do that, but since 
I also have no idea why you want to open a stack *behind* another stack, I 
thot it might be worth noting anyway.

   Hope this helps...


More information about the use-livecode mailing list