On May 22, 2008, at 10:05 AM, john darnell wrote:
Okay, this is a really basic question, but I need some help figuring out
what the code wants.

In the documentation for NSTableView, I am told that I must implement as
part of a datasource the following function:

- (id) tableView:(NSTableView *) aTableView
objectValueForTableColumn: (NSTableColumn *) aTableColumn
                                  row: (int) row
{
  /*  some code here */
  return id;
}

The question is, what does the code want me returning as an id?

I tried to do a search in Cocoa Help on id and as you might imagine, I
got lots and lots of hits, none of which looked anywhere near what I
wanted for an explanation of what id is.  So what is the framework
expecting me to return?

An (id) is simply a reference to some object; could be any object of any class.

The above method wants you to return an object that contains whatever value you want rendered in a particular row of a particular column of that particular table.

The id type is equivalent to a (void*) type in C, but with the additional ability to be the target of method calls.

b.bum
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to