Working with Tables: Writing an Address Book Application
Subject:   Solution for "Final Exercise"
Date:   2003-02-18 10:20:21
From:   ewrenbeck
I thought for future reference I would post my solution to the "Final Exercise". It didn't look like anyone had posted this code except in the java version of the solution.

I'm just as new to Cocoa as everyone else that is probably reading this article, so take this with a grain of salt:

- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
// we know which table it is, no need to worry about it

// determine the row we want to change
//NSLog(@"\nrowIndex:%i", rowIndex);
id record = [records objectAtIndex:rowIndex];

// set the value
[record setObject:anObject forKey:[aTableColumn identifier]];

// reload table
[aTableView reloadData];

1 to 1 of 1
  1. Solution for "Final Exercise"
    2003-08-25 07:38:28  dreammm [View]

1 to 1 of 1