Stack open?

Trevor DeVore lists at
Tue Feb 16 09:14:25 CST 2010

On Feb 16, 2010, at 9:40 AM, Klaus Major wrote:

>> I need to check to see if a stack is open. Not sure of the syntax  
>> or even if
>> that can be done.
>> if stack "Stack" is open then
>>   blah blah
>> end if
> you're almost there :-)
> ...
> if "Name of your stack" is in the openstacks then
> ## Stack is open
> end if
> ...

I would suggest one small tweak as using 'is in' can return false  
positives when checking the openstacks for a stack name. For example,  
if you have a stack named "dog" and a stack named "dog sled" appeared  
in the openstacks then checking if "dog" was in the openstacks would  
return true.

Try using "is among the lines" instead.

if "name of your stack" is among the lines of the openstacks then
  ## stack is open
end if

Trevor DeVore
Blue Mango Learning Systems
Releasable Revolution Resources for Developers:

More information about the use-livecode mailing list