Table of contents : Team DDU......Page 1 Contents......Page 8 foreword......Page 14 preface......Page 16 acknowledgments......Page 19 about this book......Page 20 about the author......Page 24 about the cover illustration......Page 25 PART 1 OVERVIEW......Page 28 1 Welcome to Mac OS X......Page 30 1.1 Introduction......Page 31 Origins of Mac OS X......Page 32 1.2 The Macintosh user interface......Page 33 Menus......Page 35 The Dock......Page 37 Dialog boxes......Page 38 Keyboard navigation......Page 39 1.4 The Mac OS X architecture......Page 40 Architecture layers......Page 42 The kernel environment......Page 43 Core Services layer......Page 47 Application Services layer......Page 48 Application Environment layer......Page 49 1.5 Summary......Page 53 2 Navigating and using Mac OS X......Page 54 2 2.1 Introduction......Page 55 2.2 Shells......Page 56 Terminal features......Page 58 2.3 Help system......Page 59 2.4 User accounts and privileges......Page 60 Creating user accounts......Page 61 2.5 Booting and default services......Page 63 2.6 Programs and Mac OS X bundles......Page 64 2.8 File system......Page 66 Finder......Page 68 Case sensitivity and pathname delimiters......Page 70 2.9 Single-user mode......Page 71 2.11 Processes management......Page 72 2.12 Common commands and tools......Page 73 AppleScript......Page 75 2.14 Development tools......Page 77 2.15 X Window under Mac OS X......Page 78 Installing the X server......Page 79 2.16 UNIX to Mac OS X software projects......Page 80 2.17 Summary......Page 81 PART 2 TOOLS......Page 82 3 Project Builder and Interface Builder......Page 84 3.1 Introduction......Page 85 THINK Pascal and THINK C......Page 86 Project Builder and Interface Builder......Page 87 3.2 Creating an application with Project Builder......Page 89 Targets and build styles......Page 94 Project Builder’s UNIX tools......Page 95 Project Builder’s interface......Page 96 Project Builder scenarios......Page 105 3.4 Creating an application with Interface Builder......Page 127 Interface Builder scenarios......Page 128 3.5 Summary......Page 135 4 Development tools......Page 136 4.1 Introduction......Page 137 Editors......Page 139 Mac OS X editing tools......Page 140 Version control......Page 144 Static code analysis tools......Page 148 UNIX-based editors......Page 149 4.5 Apple’s GUI-based development tools......Page 154 AppleScript Studio......Page 155 FileMerge......Page 156 Interface Builder......Page 159 JavaBrowser......Page 160 MRJAppBuilder......Page 161 MallocDebug......Page 162 PEF Viewer......Page 170 PropertyListEditor......Page 171 Quartz Debug......Page 173 Sampler......Page 174 Thread Viewer......Page 177 icns Browser......Page 182 ps (process status) and top (system usage statistics)......Page 183 sc_usage: showing system call usage statistics......Page 185 fs_usage: reporting system calls and page faults related to the filesystem in real-time......Page 187 gprof: displaying execution profile data......Page 188 leaks: searching a process’s memory for unreferenced malloc buffers......Page 190 malloc_history: showing malloc allocations that a process has performed......Page 192 sample: profiling a process during a time interval......Page 193 4.7 Summary......Page 194 PART 3 PROGRAMMING......Page 196 5 Objective-C and the Cocoa development frameworks......Page 198 5.1 Introduction......Page 199 5.2 Introduction to Objective-C......Page 200 Object-oriented terminology......Page 201 Classes......Page 202 Messages......Page 204 Categories......Page 205 Other features......Page 207 Why learn Objective-C?......Page 208 Foundation......Page 209 Application Kit......Page 214 Memory management......Page 215 Design patterns......Page 220 Cocoa event handling......Page 224 5.4 Other Cocoa development languages......Page 227 Perl......Page 228 5.5 Summary......Page 229 6 Cocoa programming......Page 230 6.1 Introduction......Page 231 6.2 The CocoaWGet example program......Page 232 6.3 Program requirements......Page 234 6.4 Program design......Page 235 Opening the project......Page 236 The interface components......Page 237 Control alignment and spacing......Page 239 Classes and instances......Page 242 6.6 CocoaWGet: implementing code with Project Builder......Page 247 The model......Page 248 The controller......Page 251 6.7 Program extensions......Page 260 Letting the user cancel downloads......Page 261 The application icon......Page 266 The help file......Page 268 6.8 Summary......Page 270 7 AppleScript programming......Page 272 7.1 Introduction......Page 273 7.2 Scripting languages......Page 274 7.3 AppleScript......Page 275 Creating and running a script......Page 277 Types of AppleScripts......Page 278 AppleScript extensions......Page 279 The AppleScript language......Page 281 iTunes and AppleScript......Page 291 AppleScript Studio......Page 296 7.5 Summary......Page 305 8 Mac OS X and beyond......Page 306 8.1 Introduction......Page 307 Compilers......Page 308 Inline scripting......Page 310 New target editor......Page 313 Searching documentation......Page 314 Setting Terminal preferences......Page 316 Splitting the Terminal window......Page 319 8.4 The PerlObjCBridge......Page 320 PerlObjCBridge example......Page 322 8.5 Summary......Page 327 A Getting and installing development tools......Page 328 B UNIX and Mac OS X command mappings......Page 330 List directory contents: ls......Page 331 Create a new directory: mkdir......Page 332 View files: head, tail......Page 333 Terminate a process: kill......Page 334 C The precursor of Mac OS X: Mac OS......Page 336 C.1 A tour of the Mac OS interface......Page 337 C.2 Interacting with the system......Page 339 C.3 Mac OS system components......Page 340 Process scheduling......Page 341 Memory management......Page 342 Extending the system through system extensions......Page 344 Interapplication communication (IAC)......Page 345 Macintosh files......Page 346 Graphics......Page 347 Networking......Page 348 D A brief history of UNIX......Page 350 High-level languages and punch cards......Page 351 Batch processing......Page 352 Time-sharing......Page 353 D.2 The birth and development of UNIX......Page 355 D.3 GNU, Free Software Foundation, and open source......Page 360 D.4 UNIX software development philosophy......Page 362 resources......Page 364 index......Page 372