• 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: Getting data from NSOutlineView [solved, kind of...]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting data from NSOutlineView [solved, kind of...]


  • Subject: Re: Getting data from NSOutlineView [solved, kind of...]
  • From: Corbin Dunn <email@hidden>
  • Date: Wed, 14 Dec 2005 07:03:06 -0800


On Dec 14, 2005, at 2:43 AM, goessly wrote:

perhaps I should rather create a new NSCell and call dataCellForRow, and then transform the value?
Actually I've made it work this way

Data from NSOutlineView at (Column, Row):

NSTableColumn * col = [myOutlineView tableColumnWithIdentifier:@"title"];
NSCell * cel = [col dataCellForRow: row];
NSString * titelString = [[cel objectValue] UTF8String];

Note that this code will give the value that was last displayed in the cell. It won't necessarily give you the value for what is on that particular row.

You will have to set the datasource value before accessing the cell. However, if you are using bindings, you would have to do more work. See this old message:

http://www.cocoabuilder.com/archive/message/cocoa/2005/10/1/147294

It doesn't have the solution, but basically you have to directly access the arraycontroller to get the data.
-corbin
_______________________________________________
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: Getting data from NSOutlineView [solved, kind of...]
      • From: goessly <email@hidden>
References: 
 >Getting data from NSOutlineView (From: goessly <email@hidden>)
 >Re: Getting data from NSOutlineView (From: goessly <email@hidden>)
 >Re: Getting data from NSOutlineView (From: Alex Fischer <email@hidden>)
 >Re: Getting data from NSOutlineView (From: goessly <email@hidden>)
 >Re: Getting data from NSOutlineView [solved, kind of...] (From: goessly <email@hidden>)

  • Prev by Date: Re: how to make our controller class first responder in document based application?
  • Next by Date: Re: Column Header Disappears
  • Previous by thread: Re: Getting data from NSOutlineView [solved, kind of...]
  • Next by thread: Re: Getting data from NSOutlineView [solved, kind of...]
  • Index(es):
    • Date
    • Thread