Documentation, Newbieness, and All That
Documentation, Newbieness, and All That
- Subject: Documentation, Newbieness, and All That
- From: Michael Urban <email@hidden>
- Date: Sat, 10 Nov 2001 09:30:47 -0500
Speaking as a demi-newbie who has been a Unix and C programmer for
many years, I think the problem with the existing Cocoa documentation
is that -- much like the Unix reference "man" pages -- it only
answers "what is" questions, but not "how to" questions. In Unix,
people are often faced with tasks like "how do I add '.txt' to the
name of every non-directory file in a directory tree?" Only with
experience -- or a separate, more task-oriented book or manual -- will
they know to look at the man page for "find".
Similarly, there is, at present, little in the way of conceptual
or task-oriented documentation for Cocoa. Think of all the questions
here that are simply answered by saying, "You want to look at the
NSFileHandle" or similar! Once we newbies know _where_ to read,
the problems are easy to solve. Yet the general, conceptual
documentation is the very area where the online information most
often says, "Not yet."
In my current personal project, I am trying to deal with my own
set of "how do I"s, and it is pretty frustrating. How do I:
1. Establish an asynchronous telnet channel to some telnetish
service? NSFileHandle combined with SimpleSockets (to get a Unix
file descriptor for NSFileHandle) and suitable notifications seems
to be an answer, but an example would be nice.
2. Change the appearance of a window's background from the default
gray prison stripes? I know that the window's NSView object can
be obtained, or changed...all I want is to override its drawRect
method... I'm stumped...interim solution is to put a big custom
NSView into the window that covers the background, and lives behind
the other widgets. Is there a more direct approach?
3. Do an "Inspector/Get Info" window? The "Sketcher" sample code provides
an example, but it took a while to find it, and is not obvious as to how
the connections between the inspector's Nib and its controller class were
built in the first place, nor how the Nib file was initially constructed.
Are these questions dumb? Newbie-ish? Perhaps. But until there are
better ways of finding the answers, people will consider to ask them.