Open Stack in same folder -- relative path?

Sarah Reichelt sarah.reichelt at
Mon Sep 17 19:13:10 EDT 2007

On 9/18/07, Sivakatirswami <katir at> wrote:
> I have two stacks in one folder
> 1) Guestbook_engine.rev
> 2) Guestbook Records.rev
> in the same folder
> I though that  a button in stack 1)
> on mouseUp
>    go stack "Guestbook Records.rev"
>    toplevel "Guestbook Records"
> end mouseUp
> should work to open the "adjacent" stack 2)
> but it doesn't
> what am I missing?
> I need this to be portable.

It depends what the defaultFolder is set to. If you are running from
the IDE, then the defaultFolder on startup will be the Revolution
application folder. In a standalone, it will be the application's

The easiest thing might be to set the defaultFolder to your
mainStack's folder on startup. That way it will work anywhere. So just
do something like this in a preOpenStack or openStack handler:

put the effective filename of me into tPath
set the itemDel to "/"
delete last item of tPath
set the defaultFolder to tPath


More information about the use-livecode mailing list