On 11/06/2010, at 6:03 PM, Tony Romano wrote:
> I guess I don't understand. Validating the drop to me is different then the
> "type" of drop action. Both in the validate and the accept, the user decides
> the "type" of drop action(copy/move) .
That's true, but in the case of the validate ca
Le 11 juin 2010 à 07:24, Graham Cox a écrit :
> The two methods do much the same work so there's a good opportunity to factor
> the code as Jens suggests, but locally saving the return value from
> validation works OK and appears to be all I can do.
Saving a return value in a ivar is usually no
I guess I don't understand. Validating the drop to me is different then the
"type" of drop action. Both in the validate and the accept, the user decides
the "type" of drop action(copy/move) . The validate method decides if the user
is allowed with the operation which is what is determined by
Thanks, but this is not the case.
The validateDrop method returns a NSDragOperation value that I compute. That is
not the same value that the [ draggingSourceOperationMask]
returns, though that is certainly one of the many inputs I use when working out
the validation.
The two methods do much t
It does. Making a call to draggingSourceOperationMask in your acceptDrop
method will give you the operation that is active. No need to cache it.
-Tony
On Jun 10, 2010, at 11:12 AM, Jens Alfke wrote:
>
> On Jun 9, 2010, at 11:12 PM, Graham Cox wrote:
>
>> In –outlineView:acceptDrop:item:c
On Jun 9, 2010, at 11:12 PM, Graham Cox wrote:
> In –outlineView:acceptDrop:item:childIndex: I can work out much the same set
> of conditions as above and mostly do the right thing, but since a move or a
> copy is equally likely, I need a way to determine what the last drag
> operation returne
What about a category on NSPasteboard that uses an associated object to store
stuff in the NSDraggingInfo?
Dave
Sent from my iPhone
On Jun 10, 2010, at 12:12 AM, Graham Cox wrote:
> I'm implementing drag and drop in an outline view.
>
> I implement –outlineView:validateDrop:proposedItem:prop
I'm implementing drag and drop in an outline view.
I implement –outlineView:validateDrop:proposedItem:proposedChildIndex: to
return one of several drag operation constants depending on combinations of
source, destination and the source mask. For example the operation can be a
move or a copy dep