In the olden days, not long after the covered wagons crossed the praries committing genocide and spreading disease along the way, we had a special way of entering our data into our new modern calculators. Calculators were those devices that came after slide rulers and we needed them in order to survive physics and chemistry classes. The mathematical notation we needed to know to use these wonderful new machines was, and is, called 'Postfix Polish' (or P.F.P. as we incorrectly acronymed it). I invariably messed up P.F.P. This was the beginning of my foray into the world of looking-it-up-in-the-manual. From there I went on to fight with manuals in my first programming classes. Eventually the manual, or the online help systems that have not entirely superseeded it, become my closest friends. But in the beginning we are always a little wary of each other.
Herein lies some of my recent social encounters involving becoming friendly with documentation related to XCODE and Objective-C.
...
‘getCount’ is, I believe, a method that I’m using from a base or super class. Today I’m using it in the’constructor’ exercise on page 137 of the Quick Start book. I know what it does, it returns a count of the number of objects I’ve instantiated for a given class, but I want to know more about it.
Looking things up in this new environment, isn’t clear to me, yet. I usually start by looking for words in the index of the current book. Then I move on to trying the help menus in XCode. Today I also tried looking in the Bjarne Stroustrup book as well as The C++ Standard Library by Josuttis. I think maybe what I’m looking for today, getCount, is part of the Foundation Library (hope I’m using the right phrase). The Foundation documentation is all on line and probably within my resources right here, once I learn how to search for things properly. I tried using the HELP pulldown menu within XCode, but get no results on the string 'getCount'. Next I put ‘NSObject’ into the ‘Q’ search box on the upper right hand corner of my current XCode window.
That got me nowhere, but again choosing the HELP pulldown menu from the XCode tool bar (or maybe it’s the option bar) , this time with NSOBJECT as my search term, took me a little further into the mysteries of documentation.
I chose ‘Search in Documentation Window’
I found it remarkably easy to get tangled up in the documentation, but by going back and forth and trying out different search terms, I finally found some information on getCount. One thing I've learned is that getCount is a function (which maybe I can translate to mean a method) related to another class I've not heard of yet. I assume that class is derived from NSObject and, somehow, methods are shared across some kind of wiring such that when I derive a class from NSObject, I can use methods associated with this (other) class.
...
Now, what was it I wanted to know about getCode?
No comments:
Post a Comment