Re: NSOutlineView validateDrop Flips Values
Re: NSOutlineView validateDrop Flips Values
- Subject: Re: NSOutlineView validateDrop Flips Values
- From: Darkshadow <email@hidden>
- Date: Wed, 4 Jul 2007 22:00:48 -0400
On Jul 3, 2007, at 2:52 PM, Paulo F. Andrade wrote:
I'm having exactly the same problem! Have you solved this??
Thanks,
Paulo F. Andrade 52439@IST
mailto: email@hidden
I'm attempting to add drag and drop support to an outline view in
my app (proving to be more difficult than I thought it would be)
and I came across a weird behavior. If I drag an item and hold it
on top of an item in the list, the proposedItem parameter to
validateDrop:proposedItem:proposedChildIndex: flips between an
appropriate value and nil every other time the message is sent.
This is without moving the mouse or anything. It simply changes on
it's own and I'm not sure why.
Thanks,
-- Seth
Perhaps it's the periodic drag updates. You can try subclassing
NSOutlineView and overriding -wantsPeriodicDraggingUpdates. This is
a method implemented by the NSDraggingDestination informal protocol.
Have it return NO, and you won't be sent messages unless the mouse
moves or a modifier flag is changed.
You can read about the method here: <http://developer.apple.com/
documentation/Cocoa/Reference/ApplicationKit/Protocols/
NSDraggingDestination_Protocol/index.html>
--------------------------------------
Darkshadow
(aka Michael Nickerson)
http://www.nightproductions.net
_______________________________________________
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