Re: mouseDragged: with NSTableView
Re: mouseDragged: with NSTableView
- Subject: Re: mouseDragged: with NSTableView
- From: Corbin Dunn <email@hidden>
- Date: Fri, 17 Apr 2009 14:07:52 -0700
On Apr 17, 2009, at 1:56 PM, Ben Lachman wrote:
Does anyone know of a way to get a mouseDragged event for a
tableview? I've sub-classed NSTableView and it's enclosing
scrollview to no effect (doesn't even hit -mouseDragged:). My guess
is that it is being eaten by the clip view, but there isn't an easy
way to sub-class that from what I can tell. Anyone have any thoughts?
Nope...you can't. NSTableView uses the "mouse tracking" approach
instead of the "three method approach" (which you would want in order
to subclass).
See:
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/HandlingMouseEvents/HandlingMouseEvents.html
In short; what are you trying to do?
You'll probably have to override mouseDown:, determine if you should
call super or not, and if not, write your own mouse-tracking loop as
seen above.
corbin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden