• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mouseDragged: with NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: mouseDragged: with NSTableView
      • From: Ben Lachman <email@hidden>
References: 
 >mouseDragged: with NSTableView (From: Ben Lachman <email@hidden>)

  • Prev by Date: mouseDragged: with NSTableView
  • Next by Date: printer user friendly paper name to internal paper name?
  • Previous by thread: mouseDragged: with NSTableView
  • Next by thread: Re: mouseDragged: with NSTableView
  • Index(es):
    • Date
    • Thread