• 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
NSTextField + Drag'n'Drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Development workflows for signed code?
  • Next by Date: Re: Text Not Anti-Aliased In NSView
  • Previous by thread: NSTextField in a sheet and focus
  • Next by thread: Multithreading and Mach ports
  • Index(es):
    • Date
    • Thread