NSTokenField and drag 'n' drop
NSTokenField and drag 'n' drop
- Subject: NSTokenField and drag 'n' drop
- From: "Tom Harrington" <email@hidden>
- Date: Mon, 24 Apr 2006 11:25:22 -0600
I'm trying to implement an NSTokenField subclass with custom behavior
when receiving a drag. Part of the requirement is that instances
should not accept drags of arbitrary text (I only want drags from
another NSTokenField in the window). However this is proving
difficult, and the token fields are receiving drags and updating their
contents when they shouldn't.
I've implemented both -draggingEntered and -draggingUpdated:, and
verified that both return NSDragOperationNone in cases where I don't
want to receive the drag. But the drags are still received. What's
really weird is that even though I've implemented
-performDragOperation:, -prepareForDragOperation:, and
-concludeDragOperation:, none of these are called in this case.
They'd return NO if invoked, but are not getting invoked. (And for
what it's worth, they do get invoked in cases where I'm dragging from
another NSTokenField).
Can anyone explain:
- Why I'm getting the drag even though I've returned NSDragOperationNone?
- Why my -performDragOperation (etc) are not called in these cases?
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden