[comp.sys.mac.programmer] Help setting HC 2.0 Scripts from an XCMD.

dave@terminator.cc.umich.edu (Dave Koziol) (11/24/90)

Has anyone changed the script of a button from a XCMD in HC2.0?

When I do what the XCMD interface docs recommend:
SetGlobal(paramPtr, 'tempGlobal', scriptHndl);
SendCardMessage(paramPtr,'set the script of button mybutton to tempGlobal');
SendCardMessage(paramPtr,'put empty into tempGlobal');

what I get is the STRING "tempGlobal" as the button script.  And, tempGlobal
isn't getting zero'd by the 2nd SendCardMessage.  When I type the
exact same text into the message window it works as expected, but from
an XCMD it doesn't get properly expanded.

I'm not a big HC fan, so maybe I'm missing something here, but I really
don't think there's that much to miss.

Thanks in advance,
  --dave koziol