Page 1 of 1

Getting information from a different stack

Posted: Wed Oct 28, 2009 7:07 pm
by exheusden
I have the following lines of code:

Code: Select all

go invisible stack "/Users/davidneale/Documents/Revolution/Web Preferences"
   put fld "Content" of cd "search" of stack "Web Preferences" into searchInit
(and I've tried this without the "invisible" modifier, too)

This returns the error:
execution error at line 20 (Chunk: can't find stack), char 4
which points to the "put fld" line in the above code.

If I open the stack "Web Preferences" (by using the "Open Stack…" menu command, for example), then the script works fine.

How can I gain access to the stack from another stack's script, without having to open it first?

Posted: Wed Oct 28, 2009 7:31 pm
by bn
David,
Web Preferences"
it looks like you omitted the ".rev" part
try

Code: Select all

go invisible stack "/Users/davidneale/Documents/Revolution/Web Preferences.rev"
regards
Bernd

Posted: Wed Oct 28, 2009 7:36 pm
by exheusden
Yes, I did. I honestly didn't think that was necessary. I must stop making assumptions!

Thank you.

Posted: Thu Oct 29, 2009 9:37 am
by Klaus
You don't even need to "go to stack xyz", invisible or not:
...
put fld "Content" of cd "search" of stack "/Users/davidneale/Documents/Revolution/Web Preferences.rev" into searchInit
...
will do :-)


Best

Klaus

Posted: Thu Oct 29, 2009 10:28 am
by exheusden
Thanks Klaus.

In this case, however, I have many other items I wish to get from the second stack, so there's a whole series of puts, so it's easier to do a single go. (Unless there's yet another way that I don't know of, of course.)