Global Misbehaving

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Sep 12 14:32:58 EDT 2007


Hi Gregory,

The following script is slightly less verbose and uses the effective  
filename (see Klaus' message). Make sure to put this script at card  
level and not at stack level.

on openStack
   global dataFilePath,partsFilepath
   -- set some relative file paths
   set the itemDel to slash
   put (item 1 to -2 of the effective filename of this stack) & \
     "/Data/" into dataFilePath
   go stack "Another Stack" --> sends an openStack message!
end openStack

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com


Op 12-sep-2007, om 18:58 heeft Gregory Lypny het volgende geschreven:

> 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?
>
> Gregory





More information about the use-livecode mailing list