• 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
Disable the drag snap-back?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disable the drag snap-back?


  • Subject: Disable the drag snap-back?
  • From: email@hidden
  • Date: Thu, 7 Feb 2002 16:16:04 -0800

How do I disable the animation that occurs when a drag is dropped on
a destination that can't receive the drag?

I am doing this so I implement a poof-style remove operation from a
NSTableView. I think I've tried just about everything I can in
NSDragging.h, without going into undocumented territory. I hope this
ability isn't undocumented, since it's trivial to do in Carbon.

If you're starting the drag with -[NSView dragImage:at:offset:event:pasteboard:source:slideBack:] or -[NSView dragFile:fromRect:slideBack:event:], then this is what the "slideBack:" parameter is for. If you're not starting the drag using this method, then I'd have to ask: why not?

When your drag ends, you find out from -draggedImage:endedAt:operation: (NSDraggingSource protocol) whether the drag succeeded or not (based on the operation passed to you), and do your poof or not.

Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Disable the drag snap-back?
      • From: Ammon Skidmore <email@hidden>
  • Prev by Date: Re: newbie question on 'Cocoa Programming for Mac OS X'
  • Next by Date: inserting images in NSTextView
  • Previous by thread: Re: Disable the drag snap-back?
  • Next by thread: Re: Disable the drag snap-back?
  • Index(es):
    • Date
    • Thread