[geeks] Cocoa

Jonathan C. Patschke jp at celestrion.net
Sat Oct 8 15:37:03 CDT 2005


On Sat, 8 Oct 2005, Joshua Boyd wrote:

> On OSX mouseDragged is only sent when the mouse is dragging.  If I
> hold still with the button still down, no events are sent.

That would be the sensible behavior, wouldn't it?  If the mouse isn't
moving, the user isn't dragging.

> Maybe I'm wrong, but I find it hard to believe that a high resolution
> loop that polls the mouse position is going to perform better.  But
> maybe that isn't what they mean by model loops.

Generally that means to obtain the data only when your program is in
some mode that makes that data worthwhile.  It's a lot more work on the
system to subscribe to a type of event and, more often than not, toss
the data away than it is to poll data only when you need it.

-- 
Jonathan Patschke   )  "What good fortune for governments that the
Elgin, TX          (    people do not think!"       --Adolf Hitler



More information about the geeks mailing list