RE: NSTableView
RE: NSTableView
- Subject: RE: NSTableView
- From: "john darnell" <email@hidden>
- Date: Fri, 23 May 2008 15:22:04 -0500
- Thread-topic: NSTableView
David:
Thank you. That works.
To be sure, my first attempt used that name, and it did not work.
Obviously, I had more than one thing wrong with the code waay back
then...
I need to ask for just a little bit of clarification, however. Your
last line says, "you can use that pointer to determine (if you have
multiple tables) which table to provide data for."
If I did have, say, three tables on a dialog, how would the code know
which function was for which table if that first element (or some other
element) is not differentiated?
R,
John
-----Original Message-----
From: David Wilson [mailto:email@hidden]
Sent: Friday, May 23, 2008 3:13 PM
To: john darnell
Cc: email@hidden
Subject: Re: NSTableView
On Fri, May 23, 2008 at 4:03 PM, john darnell
<email@hidden> wrote:
> - (id) directoryTable: (NSTableView *) aTableView
> objectValueForTableColumn:(NSTableColumn *) aTableColumn row: (int)
> rowIndex
> {
> NSLog(@"Row index is %d", rowIndex);
>
> NSString *file = [arrayOfFiles objectAtIndex:rowIndex];
> return [file self];
> }
You're not using the proper method name. You need to implement
- (id)tableView: objectValueForTableColum: row:
The name of your table has nothing to do with anything. The first
argument will contain a pointer to the table that is currently asking
for an object value; you can use that pointer to determine (if you
have multiple tables) which table to provide data for.
--
- David T. Wilson
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden