tableView:objectValueForTableColumn: number column
tableView:objectValueForTableColumn: number column
- Subject: tableView:objectValueForTableColumn: number column
- From: email@hidden (Hado Hein)
- Date: Tue, 2 Feb 2010 13:39:36 +0100
- Organization: handmade !
I have a table view which is feeded from an array.
- (id)tableView: (NSTableView *) aTableView objectValueForTableColumn:
(NSTableColumn *) aTableColumn row: (int) rowIndex
{
CFStringRef returnvalue = 0;
CFDictionaryRef fixture = [[deviceMenu selectedItem]
representedObject];
CFMutableArrayRef patch = CFDictionaryGetValue(fixture,
CFSTR("Patch"));
if ( CFEqual( [aTableColumn identifier], CFSTR("Parameter")) )
returnvalue = CFArrayGetValueAtIndex(patch, rowIndex);
// else returnvalue = [NSString stringWithFormat:@"%d", rowIndex];
else returnvalue = [[NSString stringWithFormat:@"%d", rowIndex]
autorelease];
return returnvalue;
}
That works fine.
For convinience I wanted to provide the users with a numbering column in
the front.
The problem is that, at this point of code, I see no way to get the
actual value to release it.
The shown way with autorelease bails at the first attempt to scroll.
Is there a painless way to number rows?
--
Hado Hein (KSK, DTHG), master craftsman of stagecrafts, Berlin
followme office +49.30.91688488
www.beleuchtungsbildner.de - Stage Lighting Directing
www.batchmaker.de - Stage Lighting Design, Control and Routing
_______________________________________________
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