• 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: NSOutlineView drag and drop problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView drag and drop problem


  • Subject: Re: NSOutlineView drag and drop problem
  • From: Graham Cox <email@hidden>
  • Date: Fri, 11 Jun 2010 21:57:30 +1000

On 11/06/2010, at 6:03 PM, Tony Romano wrote:

> I guess I don't understand.  Validating the drop to me is different then the "type" of drop action.  Both in the validate and the accept, the user decides the "type" of drop action(copy/move) .


That's true, but in the case of the validate case, you return a NSDragOperation code which the drag system uses to display an appropriate cursor. In other words the cursor is part of the feedback that the user is given to show what "type" the operation is.


>  The validate method decides if the user is allowed with the operation which is what is determined by you app and provides the feedback to the user. If the drop is valid, the same operation code will be preset in the accept method unless the user cancels the action(i.e and mask keys are still active or you get the full op code).

The same operation code you return from validate is not passed to the accept method. It can certainly be computed again, by the same means (and that makes a lot of sense for sure), but having computed it once I was hoping I could avoid computing it again, and just use the result from the most recent validation. I guess I was just thinking about the process in a way which made that seem the logical approach rather than factoring out the common code which is equally reasonable though not strictly necessary nor as efficient (not that efficiency is a major concern in this case).

I'll go the refactoring route.

thanks, Graham

 _______________________________________________

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: 
 >NSOutlineView drag and drop problem (From: Graham Cox <email@hidden>)
 >Re: NSOutlineView drag and drop problem (From: Jens Alfke <email@hidden>)
 >Re: NSOutlineView drag and drop problem (From: Tony Romano <email@hidden>)
 >Re: NSOutlineView drag and drop problem (From: Graham Cox <email@hidden>)
 >Re: NSOutlineView drag and drop problem (From: Tony Romano <email@hidden>)

  • Prev by Date: Re: NSOutlineView drag and drop problem
  • Next by Date: Re: dataWithPDFInsideRect and NSPrintOperation
  • Previous by thread: Re: NSOutlineView drag and drop problem
  • Next by thread: Re: NSOutlineView drag and drop problem
  • Index(es):
    • Date
    • Thread