small medium large xlarge

28 Jan 2010, 07:59
Christoph Lipp (3 posts)

Hi Everyone

I’m currently on chapter 13 and I wonder if you can help me. So far the book is excellent very easy to understand.

But I have one problem which I don’t understand or don’t find in the API documentation. I’m used to Java and the Javadoc and Ruby and you know, so far it’s easy for me to find the relevant information inside the api documentation to move on.

But I can’t find any information about the Protocols in the help? I’m running Snow-Leopard and have Xcode 3.2 installed and when I open the Help and browse to the “NSTableView” class I was expecting a a header “Delegates” and some links to the relevant delegate protocols but I can’t find something.

Example: I’m trying to find out which method is called when the checkbox is ticked. I mean I can see the right one in the book but I’m unable to find them by myself in the API documentation. First I looked at NSTableView and afterwards I thought well, maybe the Button Cell sends some messages but no information there either. Please can somebody tell me how I’m supposed to find the correct definition ?

Thank you very much!

Regards, Christoph

28 Jan 2010, 10:00
Tim Isted (105 posts)

Hi Christoph,

Protocol references generally have their own documentation rather than being listed on the same page.

There are several ways to find these references.

If you type “NSTableView” into the Documentation window, you should find a list on the left of related API, including both @NSTableViewDataSource@ and @NSTableViewDelegate@, as shown here: Click on them to open the protocol reference.

You could also just type “NSTableViewDelegate” straight into the documentation search box.

Alternatively, look down the @NSTableView@ documentation to find its @delegate@ method, and you’ll see that the method returns @(id )@: The @NSTableViewDelegate@ part of the return type is a link which will take you direct to the @NSTableViewDelegate@ documentation page. The same applies to @NSTableView@'s @dataSource@ method.

Hope that’s helpful, Tim

28 Jan 2010, 12:53
Christoph Lipp (3 posts)

Hi Tim

Thank you very much for your explanation! Now I was able to find the delegate documentation for some other classes.

Really impressed by this book, it’s so easy to read! It’s really a pleasure to start with objective-c and mac programming! Thanks a lot for your work and your help.

Regards, Christoph

You must be logged in to comment