Global Misbehaving
Klaus Major
klaus at major-k.de
Wed Sep 12 13:09:15 EDT 2007
Hi Gregory,
> Hello everyone,
>
> I have the following openStack handler in a main stack. I use it
> to set two globals which hold paths to folders that I want to use
> for back ups and such.
>
> on openStack
> global dataFilePath, partsFilePath
> -- Set some relative file paths
> get the fileName of this stack
> set the itemDelimiter to "/"
> delete the last item of it
> put it & "/Data/" into dataFilePath
> go to stack "Another Stack"
> end openStack
>
> Seems that when I declare the global dataFilePath in substacks, I
> just "/Data/" instead of the full path. What gives?
Substacks do not have a filename of their own!
Use "get the effective filename of me" in substacks and that's it :-)
> Gregory
Best
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list