Re: NSTableView, file promises, and the message queue
Re: NSTableView, file promises, and the message queue
- Subject: Re: NSTableView, file promises, and the message queue
- From: David Remahl <email@hidden>
- Date: Wed, 14 May 2003 14:23:30 +0200
On Wednesday, May 14, 2003, at 02:06 PM, Nick Zitzmann wrote:
On Tuesday, May 13, 2003, at 09:41 AM, Tim Hewett wrote:
I have promised file drag&drop working (it was a joyous
occasion when that happened :-) ), no application sticking.
It looks like you are trying to fit promised files around the
more normal drag&drop API, I don't think you can do that,
I think you have to subclass NSTableView (see below) and
overload some methods. Don't rely on the Jaguar developer
CD Cocoa documentation to cover promised files properly,
it doesn't (well mine doesn't), you have to look at the Apple
on-line documentation. That is where my code came from.
I tried your approach and it didn't work.
First of all, subclassing -mouseDown: and adding the drag stuff makes
the program assume I'm dragging something as soon as the mouse is
down. Also, it completely breaks the table view action and
double-click action, both of which I need to preserve.
So, I tried subclassing -mouseDragged: and for some reason, the
subclass method is never called.
The reason for that is that NSTableView starts event tracking in
mouseDown: and doesn't stop tracking until the mouse button is
released. That makes it difficult to overload - since you would have to
figure out exactly what mouseDown: does except for catching drags.
Then, I tried capturing the next event using NSApplication, and that
appears to block unless I set the expiration date to be [NSDate date],
which doesn't work.
So I'm all out of ideas. Has anyone made this work flawlessly? As I
said before, my solution worked, but I end up with a stalled message
queue...
I've tried both your approach and the subclassing method, without
success...Could someone who managed to do it please post some sample
code?
/ Rgds, David
_______________________________________________
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.