On Feb 11, 2013, at 4:43 AM, Jonathan Guy wrote:

> While performing a drag and drop in NSOutlineView at the point where I accept 
> the drop I
> want to throw up an NSPopover at the drop point with some options and an 
> accept or decline button to ultimately 
> accept or refuse the drop. The popover needs to run modal so as to block on 
> the return to accept. So this in short 
> is what I'm doing:
> 
> - (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id 
> <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index
> {
>       [popover showRelativeToRect:rect ofView:outlineView 
> preferredEdge:preferredEdge];
> 
>       NSWindow *window = popover.contentViewController.view.window;
>       
>       NSInteger ret = [NSApp runModalForWindow:window];
>       
>       return (ret == 1);
> }


I don't think you will find success interrupting the drag-and-drop process in 
this way, and it might also not be HIG compatible or user friendly. It would be 
easier to simply accept the drop in the above method (if the data is minimally 
acceptable) and then send the handling of the drop to a method that can query 
the user as you want using performSelector...withDelay.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to