• 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
NSOutlineView+NSTreeController+Drag&Drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView+NSTreeController+Drag&Drop


  • Subject: NSOutlineView+NSTreeController+Drag&Drop
  • From: Kevin Stone <email@hidden>
  • Date: Tue, 3 May 2005 15:29:22 -0400

I'm trying to get dragging working on an NSOutlineView that's getting its data through a NSTreeController.  I can't seem to figure out the "right" way to do this.

For example, in a NSTableView, it's possible to set up a delegate that implements part of NSTableDataSource:

- (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard*)pboard

However, for NSOutlineView there doesn't seem to be any equivalent function that uses NSIndexSet.  There is a NSOutlineViewDataSource function

- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard

but then the outline view will insist that all of the other methods in that protocol be implemented: "Must implement outlineView:numberOfChildrenOfItem:, outlineView:isItemExpandable:, outlineView:child:ofItem: and outlineView:objectValueForTableColumn:byItem:".  When those methods are made to exist, the NSOutlineView will ignore the data in the NSTreeController altogether.

It seems odd to me that there's not a more straightforward solution to this, and I feel like I've missed something here, or that something is missing (10.4.1?)  Any help would be appreciated.

Thanks!

Kevin


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSOutlineView+NSTreeController+Drag&Drop
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: Tiger documentation update
  • Next by Date: Re: Spotlight Importer Issue
  • Previous by thread: Re: Spotlight Importer Issue
  • Next by thread: Re: NSOutlineView+NSTreeController+Drag&Drop
  • Index(es):
    • Date
    • Thread