Re: Drag-n-Drop file into text field
Re: Drag-n-Drop file into text field
- Subject: Re: Drag-n-Drop file into text field
- From: Scott Anguish <email@hidden>
- Date: Tue, 3 Jun 2003 04:12:03 -0400
I wish I had time to explore this further at the moment, but as a
guess, this is going to be an interaction with the field editor class..
NSTextField uses a shared field editor so that all the fields in a
window don't have their own (rather large) object associated with
them.. they share one. your's becomes key and the shared NSTextView
gets involved, and it takes over for you subclass until it resigns.
as far as a fix goes... you might be able to specify your own field
editor for that NSTextField, and then implement the drag and drop for
that instead...
please let me know the outcome..
thanks
scott
On Tuesday, June 3, 2003, at 03:38 AM, Prem Chopra wrote:
Hi,
In my Cocoa/Objective-C application, I have a Text Field and my
requirement is
that if the user drags and drops a file into it, the text field will
accept
the file and display the full path of it. For that, I have created a
subclass
of NSTextField that behaves identically except for drag-n-drop. In the
subclass, I've overridden drag-n-drop methods like "draggingEntered",
"prepareForDragOperation", "performDragOperation",
"concludeDragOperation"
etc. The application is working fine. But the only problem is that
once the
user clicks the cursor into the Text Field box, making it active as an
editable field, dragging and dropping into it becomes disabled.
If anybody can suggest me the fix, it will be a great help.
TIA,
Prem
_______________________________________________
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.
_______________________________________________
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.