Stack open?

Jim Bufalini jim at visitrieve.com
Tue Feb 16 15:05:00 EST 2010


Jacque wrote:

> If you check for "is a stack", Rev will check the stack name (and I
> think it also opens it, like it does stacks in use, but don't quote me
> on that.) If you check for "is a file", Rev will only check the file
> name and the stack is not opened.

It does not "appear" to be opening the stack because I had also tested for
this by setting the *purge stack* property of the *Test* stack to false and
running the *if there is a stack "Test"* (which returned true) and then
opening the stack "Test" and I didn't get the "Stack is in memory, do I want
to purge, etc." dialog.

> Now, why checking "is a stack" is giving you true with only the file
> name matching seems odd at first. But it may have to do with a change
> that took place some years ago, when it became possible to refer to a
> stack in scripts interchangeably by either its stack name or its file
> name. So the engine must be checking both and returning true if there
> is
> a match in either place.

Yes, but it appears that it only first tries to match the stack filename,
which makes sense, because I, for one, would not appreciate if there were
100 stacks in a folder, along with non-stack files, if rev checked every
file to determine if it was a stack file or not. Then it appears to not open
it but just check if the file is a stack file. I had tested this also by
renaming a readme.txt file to *Test* and it retuned false.

Aloha from Hawaii,

Jim Bufalini




More information about the use-livecode mailing list