• 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: Accepting drops on a tableview's tableheader
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accepting drops on a tableview's tableheader


  • Subject: Re: Accepting drops on a tableview's tableheader
  • From: "I. Savant" <email@hidden>
  • Date: Fri, 20 Feb 2009 11:45:48 -0500

On Fri, Feb 20, 2009 at 11:28 AM, Sean McBride <email@hidden> wrote:

> How can I accept drops onto my NSTableView/NSOutlineView's NSTableHeaderView?
>
> I have drag and drop working in general, but
> tableView:validateDrop:proposedRow:proposedDropOperation: is never
> called if I hover over the tableheader.
>
> (I want to follow Finder's behaviour of accepting drops on the header as
> a way to move deeper items to the root.)

  In Finder, when I use the List view mode, dropping an item on the
header makes it a child of the currently-viewed folder. In that case,
you don't want to do anything with the header, you just want to
interpret "not dropped on any node" as "make this a root node", right?

  So, if Folder A has a child Folder B, and Folder B has a child
Folder C, and the Finder is opened to Folder A's contents, dragging
Folder C and holding it over the header, which means the drop will
have "no target node"), you want Folder C to become a child of Folder
A, and sibling of Folder B, right?

  If this is the case, then in your
-outlineView:acceptDrop:item:childIndex: method, you'll want to
respond accordingly if "item" is nil. If it's nil, it needs to be a
root item.

--
I.S.
_______________________________________________

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

  • Follow-Ups:
    • Re: Accepting drops on a tableview's tableheader
      • From: "Sean McBride" <email@hidden>
References: 
 >Accepting drops on a tableview's tableheader (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Accepting drops on a tableview's tableheader
  • Next by Date: Re: Accepting drops on a tableview's tableheader
  • Previous by thread: Re: Accepting drops on a tableview's tableheader
  • Next by thread: Re: Accepting drops on a tableview's tableheader
  • Index(es):
    • Date
    • Thread