Re: Drag n Drop on a NSControl : NSTextField?
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.