• 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
Re: Drag and drop to an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop to an NSTextView


  • Subject: Re: Drag and drop to an NSTextView
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 16 Aug 2006 20:08:38 +0200

Am 16.08.2006 um 09:27 schrieb Simon Whitaker:
I have an NSTextField in my app, which I (naively?) assumed I would simply be able to drag and drop text clippings to "for free". This doesn't appear to be the case. I wondered if anyone has a link to a good primer on using simple drag and drop? Or more specifically, I'm not sure what I need to put in my array arg to registerForDraggedTypes in order to register for text clippings - any pointers there would be appreciated.

As Matt pointed out already, your problem is probably that NSTextFields all share a common NSTextView, the field editor, and that is responsible for selection and drag & drop, but is only available to your text field while it has keyboard focus. So, I guess in your case the easiest way would be to use an NSTextView instead of an NSTextField, which will always accept drags even when it is inactive.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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: Drag and drop to an NSTextView
      • From: Simon Whitaker <email@hidden>
References: 
 >Drag and drop to an NSTextView (From: Simon Whitaker <email@hidden>)

  • Prev by Date: [JOB] Mac Developers Wanted
  • Next by Date: Tabs and Documents Design Considerations
  • Previous by thread: Re: Drag and drop to an NSTextView
  • Next by thread: Re: Drag and drop to an NSTextView
  • Index(es):
    • Date
    • Thread