[comp.sys.mac.hypercard] doMenu switching HC in and out under MF

lowersbp@ingr.com (Ben P Lowers) (08/08/90)

We're doing some interesting switching between Hypercard and
a clone [Spinnaker PLUS] using some of the following scraps
of HyperTalk:

To open the "other" application:
on openOther -- handler to open it
  open "PLUS stack" with "PLUS"
  wait 10    -- this keeps the box from coming up too fast
  answer "Welcome back!"  -- this is the box...
end openOther

And switching back and forth [as needed] between HC and PLUS with:
on doSwitch  -- called in PLUS to get back
  doMenu "HyperCard"      -- or doMenu "PLUS" to go that way...
  wait 10    -- makes it wait until we switch back in
  answer "Back so soon!?" -- before showing this box
end doSwitch


The question is: without the "wait" commands in the script, the modal
"answer" box comes up behind my NEWLY ACTIVE application's window
almost immediately after the new appl. switches in.  But with the
"wait" command right after the "doMenu", the modal "answer" seems to
NEVER come up until I switch BACK to Hypercard [which calls the other
appl. to the front].

How is it that HC is getting a little extra processing time to call
the "answer" box up, but if I "wait" only 10 ticks, it never throws
the box up until I ACTUALLY switch back [which is what I like!].
Is there any rule to the madness?  I can get along with it [unknowingly]
but would rather UNDERSTAND in case this little scheme starts acting up.

Thanks all!
--
Ben Lowers
  lowersbp@ingr.com   or   ..!uunet!ingr!lowersbp