• 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
Preventing a window from moving while dragging a view.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Preventing a window from moving while dragging a view.


  • Subject: Preventing a window from moving while dragging a view.
  • From: Tony Romano <email@hidden>
  • Date: Wed, 6 Oct 2010 11:13:53 -0700

I have a NSPanel with a NSToolbar and a tabless NSTabView to create an inspector.  The NSToolbarItems for the NSToolbar use a custom view.  This all works as expected.

I am trying to implement drag/drop to move toolbar items to/from different Inspector Panels to allow the user to customize their inspectors.  I've added the needed mouseDown and mouseDragged method in addition to the draggingSourceOperationMaskForLocal:.  When the drag operation begin during the mouseDragged: event, the NSPanel window is moving as well.  I am not calling the super implementation.

Question:  How do I prevent the Panel from moving during the drag operation?  Do I need to use a modal loop?

Thanks!

Tony Romano
http://www.cocoaegghead.com




_______________________________________________

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:[Solution] Preventing a window from moving while dragging a view.
      • From: Tony Romano <email@hidden>
  • Prev by Date: Re: Any way to synthesize KVC compliant collections?
  • Next by Date: NanoStore has moved to Google Code
  • Previous by thread: Re: Let the runloop process its queue during a long operation
  • Next by thread: Re:[Solution] Preventing a window from moving while dragging a view.
  • Index(es):
    • Date
    • Thread