As a workaround, I created a LC plugin (Mac only) that executes this code at IDE startup time:

-- stack script

command removeBadGlobals
   put the globals into tList
   if slash is not in tList then
      send "closeMe" to me in 1 tick
      exit removeBadGlobals
   end if

   -- something has a slash in it!
   replace comma with CR in tList
   filter tList with "*/*" -- isolate bad globals
   repeat for each line tGlobal in tList
      get shell("unset" && tGlobal)
      put tGlobal & cr after tRemoved
   end repeat

   -- tell user
   answer "Removed bad globals:" & cr & tRemoved

   -- close
   send "closeMe" to me in 1 tick
end removeBadGlobals


command closeMe
   close me
end closeMe



On 5/7/11 10:38 PM, Phil Davis wrote:
On 5/7/11 10:11 PM, Richard Gaskin wrote:
Jacque wrote:

It may be a bug though that LiveCode doesn't deal correctly with system
globals containing slashes. That part could be reported.
I'm not sure what I wrote is right. I just looked and I have several
system globals that both contain file paths with slashes. Neither are
causing me any of the problems that were reported.
The vars that work have slashes only in the values, but with the one
giving Phil trouble there are slashes in the name.

Yes! Exactly. The problem (as I understand it) occurs when LiveCode attempts to reference the variable, before doing anything with it.


--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to