• 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 n Drop on a NSControl : NSTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag n Drop on a NSControl : NSTextField?


  • Subject: Re: Drag n Drop on a NSControl : NSTextField?
  • From: email@hidden
  • Date: Tue, 12 Feb 2002 00:17:44 -0800

I am trying to allow drag n drop on a NSTextField control but am not
having any luck. I am using the same method as I did with other
controls but with a TextField it does not work.

What I did was subclass NSTextField. Add the needed methods for Drag n
Drop, namely:
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
- (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender;
- (BOOL)draggingUpdated:(id <NSDraggingInfo>)sender;

This works for NSTableView and NSBox but not with NSTextField. Anyone
know why?

Are you registering for the proper drag types by overriding -registerForDragTypes? Is your override getting called, or do you need to call it yourself?
It could be that NSTextField defines other methods in the NSDraggingDestination protocol that are interfering with your drag. You might need to override all of the methods in that protocol, to prevent the textfield from getting control.
And if none of that is the problem, then I have no idea. :->

Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Drag n Drop on a NSControl : NSTextField?
      • From: "Josh M. Hurd" <email@hidden>
  • Prev by Date: Re: NSTableColumn.identifier()
  • Next by Date: Re: NSSliderCell private variables
  • Previous by thread: Drag n Drop on a NSControl : NSTextField?
  • Next by thread: Re: Drag n Drop on a NSControl : NSTextField?
  • Index(es):
    • Date
    • Thread