Re: Acknowledging a successful drop operation
Re: Acknowledging a successful drop operation
- Subject: Re: Acknowledging a successful drop operation
- From: Just van Rossum <email@hidden>
- Date: Thu, 11 Dec 2003 02:36:12 +0100
Tim Hewett wrote:
>
My app receives drops of files from the Finder onto a NSTableView.
>
It all works but the acceptDrop method has to open a dialog after the
>
drop has been processed. This hangs the Finder for a short time until
>
the drop slides back to it, because acceptDrop hasn't returned YES
>
or NO yet. I tried separating the dialog out into another method then
>
calling performSelectorOnMainThread on it in acceptDrop, with the
>
waitUntilDone argument set to NO, but that didn't help.
>
>
It seems to me that the only solution is to have a way for acceptDrop
>
to send YES or NO back to the Finder before it actually returns. I
>
have done much R-ing of TFM but TFM isn't helping so far...!
>
>
I guess this scenario happens quite a lot, is there some proven way
>
to handle it?
Is your dialog already a sheet? If not, consider making it one, you can
then just "open" your sheet with [NSApp
beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] in
the drop handler, and return YES right away. This has the further
advantage that your dialog is only modal for the window containing the
NSTableView, and not the entire app.
Just
_______________________________________________
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.