• 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: What is an id?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is an id?


  • Subject: Re: What is an id?
  • From: Bill Bumgarner <email@hidden>
  • Date: Thu, 22 May 2008 10:10:49 -0700

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 (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: 
 >What is an id? (From: "john darnell" <email@hidden>)

  • Prev by Date: Re: What is an id?
  • Next by Date: Re: What is an id?
  • Previous by thread: Re: What is an id?
  • Next by thread: Re: What is an id?
  • Index(es):
    • Date
    • Thread