finding the folder of a standalone
Geoff Canyon
gcanyon at inspiredlogic.com
Thu Jan 10 11:48:01 EST 2002
At 2:40 PM +0200 1/10/02, Nir Soffer wrote:
>Is this the only way to get the folder of the standalone application?
>
>on openStack
> local lFolder
> get matchText (the fileName of me , "^(.*)/[^/]+$" , lFolder )
> set the defaultFolder to lFolder
>end openStack
>
>Since you can not use relative path without setting the defaultFolder I
>would expect the defaultFolder to be set automaticaly.
>
>Is there any way to make this code part of every project without pasting
>it inside?
The defaultFolder is set automatically. It's just that it's set to the folder containing the app running the current stack. So when you build a standalone, it's the folder with the standalone. When you're developing, it's the folder with Revolution in it. I just put all my resources into the folder with Rev while I'm developing and with the standalone when I deliver. Others put in a script similar to the one you posted to make the localFolder default to where the stack is.
regards,
Geoff
More information about the use-livecode
mailing list