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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to