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: "Josh M. Hurd" <email@hidden>
- Date: Tue, 12 Feb 2002 03:08:19 -0800
I am registering my drag types. I am not overriding
-registerForDragTypes but simply calling it at the start of my app. Do
I need to override? I am not overriding for other fields. It is
probable that NSTextField needs some other overridden methods to make
text type drop ons work. I'll have to look into it. Does anyone know
off hand, to save the time?
Thanks...
M
On Tuesday, February 12, 2002, at 12:17 AM, email@hidden wrote:
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.