• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: NSTableView


  • Subject: RE: NSTableView
  • From: "john darnell" <email@hidden>
  • Date: Fri, 23 May 2008 15:35:12 -0500
  • Thread-topic: NSTableView

Thanks for the feedback on my messages.  I'll work to do better on the
subject.

And as you can see from other responses, your answer was correct (but
you already know that).

Take care,
John
-----Original Message-----
From: cocoa-dev-bounces+john.darnell=email@hidden
[mailto:cocoa-dev-bounces+john.darnell=email@hidden] On
Behalf Of Erik Buck
Sent: Friday, May 23, 2008 3:18 PM
To: email@hidden
Subject: Re: NSTableView

Your question was very good.  My only criticism of the way you asked
you question is the vague title of the post.  Ask as many questions
like this per day as you want.

change the following:
> - (id) directoryTable: (NSTableView *) aTableView
> objectValueForTableColumn:(NSTableColumn *) aTableColumn row: (int)
> rowIndex
> {
>    NSLog(@"Row index is %d", rowIndex);
>
>    NSString *file = [arrayOfFiles objectAtIndex:rowIndex];
>    return [file self];
> }

to this:

- (id)tableView:(NSTableView *)aTableView
     objectValueForTableColumn:(NSTableColumn *)aTableColumn
     row:(int)rowIndex
{
    NSLog(@"Row index is %d", rowIndex);

    NSString *file = [arrayOfFiles objectAtIndex:rowIndex];
    return file;
}
A data source can be any object you specify, but the names of the data
source methods are not optional.  You must provide the correctly named
methods.

http://developer.apple.com/documentation/Cocoa/Conceptual/TableView/Task
s/UsingTableDataSource.html#/
/apple_ref/doc/uid/20000117

By changing the name of the method, you provided no way for the
NSTableView to find the needed data.

_______________________________________________

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:
h.com

This email sent to 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

References: 
 >Re: NSTableView (From: Erik Buck <email@hidden>)

  • Prev by Date: Re: Properties & GC (was Re: Cocoa et al as HCI usability problem)
  • Next by Date: Re: NSTableView
  • Previous by thread: Re: NSTableView
  • Next by thread: Re: NSTableView
  • Index(es):
    • Date
    • Thread