Re: Xcode Newbie - How to use Xcode Developer Document to find answers
Re: Xcode Newbie - How to use Xcode Developer Document to find answers
- Subject: Re: Xcode Newbie - How to use Xcode Developer Document to find answers
- From: James Bucanek <email@hidden>
- Date: Sat, 18 Mar 2006 08:34:50 -0700
Phil Faber wrote on Saturday, March 18, 2006:
>I'm new to software development but have been an avid Apple/Mac user
>since ... well since the Apple ][ !!
>
>It seems to me that Xcode's built-in documentation probably answers
>most questions. Except one: How to use it effectively!?
>
>For example, I've created a simple window with a box to enter data
>into and a button to process that data; if I want to work out how to
>display a simple dialog box once the data has been processed (i.e.
>"Are you sure you want to delete this? [Yes] [No]"), how can I look
>up how to achieve this using the documentation?
>
>In this example, I tried entering 'dialog' in the 'API Search' and
>the 'Full Text Search' and received a great deal of information but
>as a beginner, most of it means nothing to me. All I'm after is the
>coding (presumably only a one-liner).
>
>Can anyone advise how to use the documentation to look up relatively
>simply stuff like this?
Welcome Phil,
Let me start with the technical part of your question.
In "API Search" mode, search terms are matched instantly against the programming interfaces you have selected in the Preferences. Thus, if you're programming in Cocoa then you would probably want to limit your searches to the Cocoa (and possibly C) interface. Start typing the name of a class, type, method, constant, etc. and links to the matching API documentation will instantly appear in the "hits" table at the top of the window. Any selection that you've made in Search Groups is ignored in API search mode.
"Full-Text Search" mode is completely different, almost the opposite of, "API Search" mode. A text search searches the text of the group or groups you have selected in the Search Groups. You can perform complex boolean searches that include conditionals and quotes, such as "alert (dialog | sheet)" which would search or all article containing the word "alert" and either of the words "dialog" or "sheet".
The more pressing question is how to effectively find what you want to know. This is particularly difficult in the beginning because you can't know where to start looking if you don't know what you're looking for. Even after decades of programming, I have found myself stymied by this very conundrum.
The key to remember is that Apple produces, for the most part, _reference_ documentation. While there are some very good introductions to Cocoa and such, most of Apple's documentation is just that: documentation. It documents exactly how things work. It is not (generally) intended to be instructional or tutorial.
When looking for an introduction or an overview to a particular technology, browse or search (using Full-Text Search) the articles in Reference Library groups. Narrow your search to the particular technology group (i.e. Carbon, Cocoa, Quicktime, etc.) that you are focused on.
When looking for a specific function call or class, use the API search. This is also available interactively in your source code by holding down the Option key while double-clicking on a symbol name.
However, these are only useful if you already have some idea of what you're looking for. The grey area of the documentation -- any, not just Apple's -- is the "how do I" questions. These are not going to be easily answered in the documentation. What you need is a good tutorial, which takes you step-by-step through the process of building an application, putting up a dialog, and so forth. You need a guide that gives you a high-level overview of the landscape so you can get your bearings. For this I would strongly suggest that you look for an introductory book to Cocoa (or Carbon) and start your inquiries there. Once you have a direction, then turn to Apple's documentation for additional details.
And if you're still stuck, make use of the various forums (Cocoa-Dev, Carbon-Dev, ...). If you're just starting out, it doesn't matter what direction you want to go in; it's highly likely that someone else has already gone down that road before you.
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/> Available April 3rd, 2006
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden