NSTextField + Drag'n'Drop
NSTextField + Drag'n'Drop
- Subject: NSTextField + Drag'n'Drop
- From: Jean-Nicolas Jolivet <email@hidden>
- Date: Tue, 09 Dec 2008 14:48:57 -0500
I'm trying to subclass NSTextField so that it accepts dragged
directory from the Finder... (I know it already does, but I need to
modify the behavior slightly)...
Instead of "inserting" the dragged file's path in the current text of
the text field, I need to replace the whole textfield's text with the
newly dragged file's path... also, I need to accept directory only,
dragged files will not be accepted...
Normally I wouldn't have any problems doing it with a custom NSView,
however, since NSTextField already has a default drag and drop
behavior, are there any special considerations? Also, are those
default drag/drop behaviors implemented in NSTextField or higher up
the class hierarchy? (i.e. NSResponder or NSControl etc..)... which
methods should I override (i.e. is it only draggingEntered: and
performDragOpeation:, as I am doing with my custom NSViews?)
Any information would be appreciated!
Jean-Nicolas Jolivet
email@hidden
http://www.silverscripting.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden