Getting the stack name
Devin Asay
devin_asay at byu.edu
Fri May 12 15:09:00 EDT 2006
On May 12, 2006, at 12:49 PM, J. Landman Gay wrote:
> Devin Asay wrote:
>> We know that stackfile names (the .rev file name) and stack names
>> are not always the same. Given the stackfile name, and after
>> opening the stackfile with a go stack command, is there a reliable
>> way to get the short name of the main stack? Is the name of a
>> newly opened stack ALWAYS on the first line of the result of the
>> openstacks function?
>
> Yes, I think so. But I haven't ever done a specific test for it.
>
>> What I really want is 'get the short name of the mainstack of
>> stackfile "/my/stack/path/stack.rev"'.
>> Is there something obvious I'm overlooking?
>
> You can refer to a stack by either its name or its filename, so it
> is legal to say:
>
> get the short name of stack "/my/stack/path/stack.rev"
Ah, but the trick is I am trying to get the short name of a stack on
a remote server, and this doesn't work:
get the short name of stack "http:/myserver.com/path/stack.rev"
I've been looking at the revLoadedStacks(application) function. It
looks like it may do what I need. This form excludes IDE stacks, and
as far as I can tell, each newly opened stack gets added to the end
of the list of results. Anyone know if this is always consistent?
devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list