Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Jan 29, 2009, 05:13 PM   #1
macrumors 65816
Join Date: Jun 2007
NSTableView Multiple textfield cells in one cell, driving me nuts.

I've been trying to get this to work all day and I just can't get it. I have two items showing in the cell but I can't figure out how to change the text once it's there.


Would I have to do something in this method?

PHP Code:
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex{
NSLog(@"%@ - %d",aTableColumnrowIndex);
    if ([[
aTableColumn identifierisEqualToString:@"Title"]){
//something to change the values?
    return [
title objectAtIndex:rowIndex];

The picture shows what I'm trying to do, I need to change both of those values under Title.
Attached Thumbnails
Click image for larger version

Name:	Picture 2.png
Views:	24
Size:	11.2 KB
ID:	155258  
detz is offline   0 Reply With Quote
Old Jan 29, 2009, 11:03 PM   #2
Moderator emeritus
kainjow's Avatar
Join Date: Jun 2000
There are two ways. One would be to use your current method and return some object that stores both values (such as a dictionary) and then retrieve that dictionary in your custom cell via the objectValue method (or override the setObjectValue: method and update your text fields there), or write accessor methods to those text fields in the cell and set them appropriately in tableView:willDisplayCell:forTableColumn:row:

Last edited by kainjow; Jan 29, 2009 at 11:17 PM.
kainjow is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: Sync Problem driving me nuts... serratedauto iOS 7 0 Sep 29, 2013 06:01 PM
Ghost of an IP past...driving us NUTS! OldManEmu Mac Basics and Help 3 Jul 8, 2013 10:38 AM
Mac Mail Driving Me Nuts Cuechick OS X 10.8 Mountain Lion 3 Feb 21, 2013 12:40 PM
OS X: Bootcamp is driving me nuts, please help! Raisen223 Mac and PC Games 12 Nov 28, 2012 06:24 PM
screensaver driving me nuts dowser81 OS X 10.8 Mountain Lion 5 Nov 8, 2012 05:41 PM

Forum Jump

All times are GMT -5. The time now is 08:55 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC