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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to