[comp.sys.mac.hypercard] Delay after executing script...

Griffiths.R@AppleLink.Apple.com (Rob Griffiths) (11/01/90)

I'm currently running  HyperCards 1.2.5 on a Mac IIfx, and have run into a 
strange quirk...

I have two buttons, whose job is to do nothing more than (a) toggle the 
status of 13 radio buttons on the current card; and (2) place either a 1 
or a 0 into 13 background fields on different cards.  The "toggle on" 
script is shown below (the toggle off is identical, if you reverse the 
trues, hides, shows, and 0 for 1...).

on MouseUp
     set lockscreen to true
     repeat with i = 1 to 13
           put 1 into background field "VIEW" of card ("A"&i)
           set the hilite of card button i to true
           set cursor to busy
     end repeat
     hide card button "Show Statements"
     show card button "Hide Statements"
     unlock screen with dissolve fast
end MouseUp

The problem occurs when executing this script.  When the script
is finished (which is obvious on my screen, as one button has 
vanished, and the other has appeared), I cannot do anything for a period 
of about two seconds.  Mouseclicks are read during this lapse, but don't 
execute until after this time has elapsed...

Does anyone have any ideas as to the cause of this strange delay?  Is the 
script somehow still working on updating the background fields on the 13 
cards?  If so, how can I maintain script control (to prevent inadvertent 
mouse clicks) until it has finished?  Am I missing something obvious?  Any 
suggestions (via E-Mail) would be greatly appreciated -- I'm under a 
fairly tight deadline crunch!

thanks in advance;
rob

Griffiths.R@AppleLink.Apple.Com