In article <2oydneAWac0i9czVnZ2dnUVZ_qLinZ2d@[EMAIL PROTECTED]
>,
Don Bruder <dakidd@[EMAIL PROTECTED]
> wrote:
> The CocoaDev site that Reinder pointed me at was *VERY* useful - At
> least now I think I've got the beginnings of a grip on how to use
> NSTableView.
>
> Except for one minor detail...
>
> ...
>
> // This routine appears to never get called.
> // Putting a breakpoint (or several of them) anywhere in it does nothing
> whatsoever. I strongly suspect that this is the reason I'm getting a
> blank NSTableView displayed, but I don't know where to look for the
> problem. If it were to execute, it looks like it *SHOULD* do what it's
> supposed to. But it doesn't seem to get executed, and I don't know why.
> - (id)tableView:(NSTableView *)aTable
> objectValueForColumn:(NSTableColumn *)aCol row:(int)aRow
> {
> id loc_id, loc_dat;
> NSMutableArray *loc_col;
>
> loc_id = [aCol identifier];
> if (loc_id != nil)
> {
> loc_col = [itemList objectForKey:loc_id];
> if (loc_col != nil)
> {
> loc_dat = [loc_col objectAtIndex:aRow];
> }
> }
> return (loc_dat);
> }
The first thing I want to say is this:
A dictionary of arrays is going to be a lot harder to sort than an array
of dictionaries when/if you decide that's something you want to do.
The second thing - and the actual answer to your problem - is that
you've named the method incorrectly. I'd be marginally surprised if
you're not getting a message emitted when you run that says the object
isn't responding correctly. The method signature is:
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex
Note "objectValueForTableColumn."
^^^^^
G
--
"Harry?" Ron's voice was a mere whisper. "Do you smell something ...
burning?"
- Harry Potter and the Odor of the Phoenix


|