Re: Getting data from NSOutlineView [solved, kind of...]
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