[geeks] Cocoa

Joshua Boyd jdboyd at jdboyd.net
Sat Oct 8 14:53:32 CDT 2005


On Sat, Oct 08, 2005 at 02:30:04PM -0400, Patrick Giagnocavo 717-201-3366 wrote:
> On Sat, 2005-10-08 at 13:33, Joshua Boyd wrote:
> > That would be a fun book to have even if it doesn't totally cover what I
> > want.  
> > 
> > I think that is the Nextstep book that I used to check out of the
> > library repeatedly wishing that I could someday get my hands on one of
> > those machines.
> >  
> > BTW, would you mind checking in your copy to see if it says anything
> > about mouseMove events? Other books I've looked at have covered mouseUp,
> > mouseDown, and mouseDragged, but not mouseMove.
> 
> It has this to say about mouseMoved events:  
> 
> The mouseEntered: and mouseExited: events are sent to the "owner"
> object specified by the setTrackingRect:inside:owner:tag:left:right
> message.  The mouseMoved: and mouseDragged: events are diffferent form
> other events because they are sent continuously, and therefore tend to
> drag down system performance.  Use them only when necessary.  (You can
> usually get around the need to catch mouseMoved: or mouseDragged:
> events by overrriding other methods in the Cell or Control classes, or
> by creating your own modal loops.) 

I wonder if they changed the behavior.  On OSX mouseDragged is only sent
when the mouse is dragging.  If I hold still with the button still down,
no events are sent.

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.



-- 
Joshua D. Boyd
jdboyd at jdboyd.net
http://www.jdboyd.net/
http://www.joshuaboyd.org/



More information about the geeks mailing list