[comp.sys.mac.hypercard] SetGlobal stupidity

ws0n+@andrew.cmu.edu (Walter Ray Smith) (01/20/88)

More HyperTalk Bugs:

The semantics of the SetGlobal call from an XCMD are not the same as the 
semantics of setting a global variable through HyperTalk.  If the global 
variable does not already exist, calling SetGlobal on it does nothing but 
cause a SysBeep (some error message!).  I can't find any way of creating a 
global variable with a computed name except temporarily replacing the script 
of something with the appropriate HyperTalk code.

There have been several cases in which I got a bizarre error message that had 
little to do with my error, and when I clicked the "Script" button I was 
dropped into the stack script at the first character.  I can believe that I 
don't fully understand the error, which explains the weird message, but what 
reason could there be for putting me at the first character of the stack 
script, which is part of a comment?  If I can repeat this, I'll post details.

- Walt

winkler@apple.UUCP (Dan Winkler) (01/22/88)

> The semantics of the SetGlobal call from an XCMD are not the same as the
> semantics of setting a global variable through HyperTalk.  If the global
> variable does not already exist, calling SetGlobal on it does nothing but
> cause a SysBeep (some error message!).  I can't find any way of creating a
> global variable with a computed name except temporarily replacing the script
> of something with the appropriate HyperTalk code.

Oops...  Sorry about that.  This is true and it's a bug.  SetGlobal
should obviously create a global if it needs to.  I'll fix it in a
future release.

Dan.