Stack open?

Jim Bufalini jim at visitrieve.com
Tue Feb 16 14:07:48 EST 2010


Klaus wrote:

> sorry, but this does not work as one might exspect! :-)
> 
> If there is a stackfile "stackname.rev" in the defaultfolder then this
> will also resolve to true
> even if this stack is NOT open.

Interesting. Just did some testing on this and you are correct! What is also
interesting is that it only resolves to true if the file name is the same as
what you are testing for (on PC, irrespective of the extension). So, the
statement "if there is a stack "Test"..."

If the file name is "Test" (regardless of if the extension is .rev, .xx, or
no extension) and it is a stack with a name of "Test2" it will still resolve
to true. But, if the file name is "Test2" and the stack name is "Test", it
will resolve to false. And, as you say, only if the file is in the
defaultFolder. There is something "wrong" with this. ;-)

I guess I have never run across this because, when in the IDE, the Rev
folder is the defaultFolder and in a standalone the standalone folder is the
defaultFolder and I never put any other stacks in either of these. And, when
I do change the defaultFolder, for example, for a "files" command, I always
change it back to where it was before the handler exits.

I learn something new every day.

Aloha from Hawaii,

Jim Bufalini






More information about the use-livecode mailing list