• 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
mouseDragged not working in NSSplitView subview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mouseDragged not working in NSSplitView subview


  • Subject: mouseDragged not working in NSSplitView subview
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Sat, 8 Sep 2007 17:28:12 -0700

I have an NSView subclass that implements mouseDragged: to initiate a promised file drag, and it works quite well as a standalone view. If I make it a subview of an NSSplitView, my mouseDragged: method is no longer called, though.

I used poseAsClass: to override NSSplitView's mouseDown: and only call super's implementation when it actually gets a click on a divider rect, and that works (my mouseDragged: method is called). Obviously subclassing would be preferable to posing.

I could run a while(1) loop in mouseDown: and get events myself, but that solution isn't as aesthetically pleasing to me and it seems to screw up event handling in cases like mine. Is that really the right thing to do? Sketch does it, and apparently NSSplitView as well (and Apple's DraggableScrollView example, IIRC).

thanks,
Adam
_______________________________________________

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


  • Prev by Date: custom view won't update
  • Next by Date: Re: Customize the disclosure triangles in NSOutlineView
  • Previous by thread: Re: custom view won't update
  • Next by thread: Getting button binding to invoke an action
  • Index(es):
    • Date
    • Thread