Re: Drag and drop to an NSTextView
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