Dragging files to NSTextView ...
Dragging files to NSTextView ...
- Subject: Dragging files to NSTextView ...
- From: Jerry LeVan <email@hidden>
- Date: Thu, 4 Mar 2004 08:43:49 -0500
I have been trying to enhance my database browser by allowing the
user to drag a file onto the sql edit window ( a NSTextView ).
In my first attempt I subclassed NSTextView and added what I
thought were the relevant dragging destination routines.
NSLogging showed that the routines "prepareForDragOperations"
and performDragOperation where never called.
I then tried subclassing NSWindow, this sorta works, as soon
as I enter the window draggingEntered is called and as long as
I avoid the NSTextView the drop will occur. Entering the NSTextView
causes a draggingExited call. Not a very satifying situation.
I then went back to the subclassing NSTextView approach and added
a "draggingUpdated" routine and to my surprise, the prepare and perform
routines are called and I can capture the filename. The bad news is
that within the NSTextView dragging of text fragments is of course
now broken.
I am trying (unsuccessfully) to make calls to super to allow the
built in drag routines for NSTextView to work, but I am having
no luck.
Is it possible to "drag a text file" onto a NSTextView *and* have
the internal drag stuff still work?
Excuse the incoherence but I am a bit tired...
--Jerry
_______________________________________________
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.