defaultfolder
Robert Brenstein
rjb at robelko.com
Wed Apr 5 15:54:49 EDT 2006
>I am having a terrible time with my defaultfolder being reset to
>"/". I am keeping a collection of related stacks in one folder and
>my scripts rely on opening stacks within that folder. I have a
>setdefaultfolder script that parses the name of the stack and sets
>the defaultfolder variable to be the folder name where the stacks
>are stored. But when one of my scripts creates a new stack, despite
>the fact that the setdefaultfolder handler is called, the
>defaultfolder variable seems to be set to "/" thus causing a script
>failure. What is it I don't understand?
defaultfolder is not a variable and is not a handler, so we might be
talking about different things.
The defaultfolder can change behind your back. If you want to make
sure it is correct, set it to what you need immediately before
accessing files or simply use dynamically assembled full path names.
Like
open stack (myStacksFolderPath & nextStacktoOpenName)
Robert
More information about the use-livecode
mailing list