XY

Tereza Snyder tereza at attainmentcompany.com
Fri Jan 25 16:53:00 EST 2002


on 01.25.02 02:16PM, Richard Gaskin wrote:

> 
> As normally written in HyperCard (as the first example showed), the xy
> handler is invoked, runs while it's needed, and stops soon after when the
> mouse is clicked.  Yes, it was eating far more clock cycles than needed
> while it was running, but using it is inherently modal by nature anyway --
> the only thing the user's doing is moving the mouse; as soon as they click
> it's over.

I agree that the XY handler is a good example of a legitimate use of
polling, though I prefer the mousemove plus frontscripts implementation
overall to avoid 'waste of clock cycles'.

I would recommend, however, that most places where one is tempted to use a
repeat "while the mouse is..." would work quite reliably with mouseMove.
Scott finally convinced me of this after I tried my mightiest to create a
group of objects that would work better in concert without mouseMove, and
every time the mousemove solution was cleaner, faster, and much more
reliable. It does mean watching where you put your handler (i.e. NOT where
it would be executed all the time ;-).

tereza


+ Tereza Snyder 
+ Senior Software Developer
+ Attainment Company, Inc.
+ <www.attainmentcompany.com>
+ 800.327.4269




More information about the metacard mailing list