Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
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:	9
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
NSTableview with different cells in one column Boghog Mac Programming 3 Mar 7, 2010 07:19 PM
New iMac, Hard Drive Noise... Driving me nuts! JustiNYCity iMac 11 Oct 20, 2009 07:42 AM
prob with menus in Safari - driving me nuts ! carlsberg Web Design and Development 3 Jun 2, 2007 08:15 PM
computer "noise" in my speakers driving me nuts LethalWolfe Digital Audio 8 Sep 17, 2006 09:01 PM

All times are GMT -5. The time now is 02:33 AM.

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

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013,, LLC