Determining if Stack is Visible

Devin Asay devin_asay at byu.edu
Thu May 22 11:59:10 EDT 2008


On May 22, 2008, at 7:22 AM, Steven Axtell wrote:

> Mark,
>
> I didn't state my question very clearly.  From what I see, the  
> "visible" property is used to make the object visible or invisible  
> but cannot be used to determine if the object is visible.  I know  
> that I am missing something somewhere.  I tried using code  
> something like the following:
>
> if visible of stack "substack" is true then
>   [process code]
> end if
>
> When I use this code nothing happens.

Steve,

A stack can be closed or open. A stack can also be visible or not  
visible. So it is possible that the visible property of a stack is  
true, but if that stack is closed it will still not be "seeable".  
Conversely, a stack may be open but have its visible property set to  
false. In that case it's also not "seeable". In the case of a stack  
you might have to say something like:

if the visible of stack "substack" AND the long id is among the lines  
of the stacks then
   -- do stuff
end if

Or alternatively:

go to stack "substack"
if the visible of stack "substack" then
   -- do stuff
end if

A minor style note: since the visible property always resolves to  
true or false, the following two conditional statements are identical:

if the visible of stack "substack" is true then
if the visible of stack "substack" then

Hope this helps.

Regards,

Devin


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list