Re: Tips on Reading TFM?
Re: Tips on Reading TFM?
- Subject: Re: Tips on Reading TFM?
- From: "Clark S. Cox III" <email@hidden>
- Date: Sat, 5 Jan 2002 19:22:07 -0500
On Saturday, January 5, 2002, at 06:06 , Tom Harrington wrote:
I wonder if anyone has some useful tips on locating the information you
need in Apple's docs.
I'm new to Cocoa. Today I wanted to use NSBundle to load a nib file
which is located in the application's "Resources" directory. Looking at
the NSBundle docs (and those of its superclass NSObject) showed no
nib-specific methods. So, I spent a most of the morning trying to make
things like NSBundle's +bundleWithPath work, with much frustration and
ultimately no luck.
While looking up something else I noticed that the Appkit docs include a
second NSBundle entry. I hadn't even bothered to look for this in the
Appkit docs, because NSBundle is a Foundation framework class, and I'd
already found it's doc page, or so I thought. These docs include the
+loadNibNamed method, exactly what I needed.
Remember that in Obj-C, you can add methods to already written
classes, so, many of the Foundation classes are extended in the AppKit,
instead of being completely rewritten. The main thing to remember is that
if it deals with the GUI, look in the AppKit, if, on the other hand, it
deals with something that is likely to be done from a command-line program/
tool it's in the FoundationKit.
Obviously I'm not grasping the organization of the documentation very
well; how would a more-experienced Cocoa developer think to locate
something like this?
When I am looking for information on a class, I go through these steps:
1) Look at the header(s). The method names are usually well-named enough
that I can tell what they do without checking the documentation
(+loadNibNamed would be one of those).
2) Check the AppKit documentation on the class, as anything that the
AppKit adds is probably "higher level" than the FoundationKit API
3) Check the FoundationKit documentation on the class
4) If I still haven't found what I'm looking for, I turn to the mailing
list(s).
5) If I still haven't found what I'm looking for, I start crying, and
beating the ground with my fists. :-)
--
Clark S. Cox, III
email@hidden
http://www.whereismyhead.com/clark/