• 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
NSTokenField and drag 'n' drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSTokenField and drag 'n' drop
      • From: "Tom Harrington" <email@hidden>
  • Prev by Date: Frameworks, I need to make one...
  • Next by Date: Core-Data, can you issue an NSrequest from awakefrominsert
  • Previous by thread: Frameworks, I need to make one...
  • Next by thread: Re: NSTokenField and drag 'n' drop
  • Index(es):
    • Date
    • Thread