[comp.sys.mac.hypercard] Update events in HyperCard?

anson@elrond.CalComp.COM (Ed Anson) (11/04/87)

I am trying to design an XCMD that will produce a special graphic on part of
the card.  Unfortunately, I don't know how to handle the case where the
card might be temporarily obscured by another window.  In a regular
application, I would receive an update event, but this doesn't seem to be
available in HyperCard scripts.  Am I overlooking something?  HELP!
-- 
=====================================================================
   Ed Anson,    Calcomp Display Products Division,    Hudson NH 03051
   (603) 885-8712,      anson@elrond.CalComp.COM

hyperbug@apple.UUCP (Keith Rollin) (11/05/87)

In article <1394@elrond.CalComp.COM> anson@elrond.CalComp.COM (Ed Anson) writes:
>I am trying to design an XCMD that will produce a special graphic on part of
>the card.  Unfortunately, I don't know how to handle the case where the
>card might be temporarily obscured by another window.  In a regular
>application, I would receive an update event, but this doesn't seem to be
>available in HyperCard scripts.  Am I overlooking something?  HELP!

The technique I use is to open a Picture, draw to it, post it to the 
Clipboard (be sure to to a ZeroScrap first! I forgot and had many weird
things happen), and then do a "SendCardMessage('type "V" with commandkey')"
That pastes the picture on the clipboard PERMANENTLY on to the card. If you
don't want it there, and you don't do anything else to the card, I think that
you can just UNDO the changes.

NOTE: this method is not all the blindingly fast. First of all, posting to
the clipboard is not that fast, but it takes HyperCard twice as long to 
load in its painting tools and paste the picture.

Hope this helps.

-- 

Apple's HyperCard Grievance Center
"Give us your bugs, your comments, your gentle criticisms..."

UUCP:  {pyramid!sun,voder,nsc,ucbvax!mtxinu,dual,decwrl,amdahl}!apple!hyperbug

anson@elrond.CalComp.COM (Ed Anson) (11/09/87)

In article <6638@apple.UUCP> hyperbug@apple.UUCP (Keith Rollin) writes:
>The technique I use is to open a Picture, draw to it, post it to the 
>Clipboard (be sure to to a ZeroScrap first! I forgot and had many weird
>things happen), and then do a "SendCardMessage('type "V" with commandkey')"

Yes, that gets the graphic onto (and into) the card, but it doesn't solve
my problem.  I guess I need to be more clear:

If my objective were to produce a static graphic on a card, I wouldn't even
bother with an XCMD.  There are simpler ways to do that.  My XCMD wants to
be called repeatedly, under various conditions, to dynamically update the
display over a portion of the card.  The only condition I don't know how to
handle is when another window disappears from over the card, leaving a hole 
in my special image.

Until I find the answer to this one, I have to pursue some means other than
HyperCard to implement my application.  Too bad... HyperCard does 99% of
what I need.
-- 
=====================================================================
   Ed Anson,    Calcomp Display Products Division,    Hudson NH 03051
   (603) 885-8712,      anson@elrond.CalComp.COM