• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing drag image while modal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing drag image while modal


  • Subject: Re: Changing drag image while modal
  • From: Keary Suska <email@hidden>
  • Date: Tue, 12 Feb 2013 08:40:54 -0700

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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >Changing drag image while modal (From: Jonathan Guy <email@hidden>)

  • Prev by Date: Re: Breaking on nil context
  • Next by Date: Re: Uploading photos to iCloud programatically
  • Previous by thread: Changing drag image while modal
  • Next by thread: How to add page in UIScrollView
  • Index(es):
    • Date
    • Thread