ebook img

Programming Mac OS X: A guide for UNIX developers PDF

385 Pages·2003·14.748 MB·English
by  Kevin
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Programming Mac OS X: A guide for UNIX developers

Programming Mac OS X: A GUIDE FOR UNIX DEVELOPERS KEVIN O’MALLEY MANNING www.it-ebooks.info Programming Mac OS X www.it-ebooks.info www.it-ebooks.info Programming Mac OS X A UNIX GUIDE FOR DEVELOPERS KEVIN O’MALLEY MANNING Greenwich (74° w. long.) www.it-ebooks.info For electronic information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Fax: (203) 661-9018 Greenwich, CT 06830 email: [email protected] ©2003 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books they publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Tiffany Taylor 209 Bruce Park Avenue Typesetter: Denis Dalinnik Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1-930110-85-5 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – VHG – 05 04 03 02 www.it-ebooks.info brief contents PART 1 OVERVIEW ............................................................................. 1 1 (cid:1) Welcome to Mac OS X 3 2 (cid:1) Navigating and using Mac OS X 27 PART 2 TOOLS ................................................................................... 55 3 (cid:1) Project Builder and Interface Builder 57 4 (cid:1) Development tools 109 PART 3 PROGRAMMING.................................................................. 169 5 (cid:1) Objective-C and the Cocoa development frameworks 171 6 (cid:1) Cocoa programming 203 7 (cid:1) AppleScript programming 245 8 (cid:1) Mac OS X and beyond 279 v www.it-ebooks.info www.it-ebooks.info contents foreword xiii preface xv acknowledgments xviii about this book xix about the author xxiii about the cover illustration xxiv PART 1 OVERVIEW.................................................................. 1 1 Welcome to Mac OS X 3 1.1 Introduction 4 Origins of Mac OS X 5 1.2 The Macintosh user interface 6 1.3 The Mac OS X user interface 8 The desktop 8 (cid:1) Menus 8 (cid:1) The Dock 10 Window layering 11 (cid:1) Dialog boxes 11 (cid:1) Drawers 12 Keyboard navigation 12 (cid:1) Other interface features 13 1.4 The Mac OS X architecture 13 Architecture layers 15 (cid:1) The kernel environment 16 Core Services layer 20 (cid:1) Application Services layer 21 Application Environment layer 22 (cid:1) Aqua 26 1.5 Summary 26 vii www.it-ebooks.info viii CONTENTS 2 Navigating and using Mac OS X 27 2.1 Introduction 28 2.2 Shells 29 Terminal features 31 2.3 Help system 32 Help Viewer 33 2.4 User accounts and privileges 33 Creating user accounts 34 2.5 Booting and default services 36 2.6 Programs and Mac OS X bundles 37 2.7 Security issues 39 2.8 File system 39 Finder 41 (cid:1) Case sensitivity and pathname delimiters 43 2.9 Single-user mode 44 2.10 System log files 45 2.11 Processes management 45 2.12 Common commands and tools 46 2.13 Scripting languages 48 AppleScript 48 2.14 Development tools 50 2.15 X Window under Mac OS X 51 Installing the X server 52 2.16 UNIX to Mac OS X software projects 53 2.17 Summary 54 PART 2 TOOLS....................................................................... 55 3 Project Builder and Interface Builder 57 3.1 Introduction 58 Macintosh Programmer’s Workbench 59 THINK Pascal and THINK C 59 (cid:1) CodeWarrior 60 Project Builder and Interface Builder 60 3.2 Creating an application with Project Builder 62 www.it-ebooks.info CONTENTS ix 3.3 Project Builder in depth 67 Targets and build styles 67 (cid:1) Project Builder’s UNIX tools 68 Project Builder’s interface 69 (cid:1) Project Builder scenarios 78 3.4 Creating an application with Interface Builder 100 Interface Builder scenarios 101 3.5 Summary 108 4 Development tools 109 4.1 Introduction 110 4.2 UNIX development tools under Mac OS X 112 Editors 112 (cid:1) Mac OS X editing tools 113 Version control 117 (cid:1) Static code analysis tools 121 4.3 Compilers and build tools 122 4.4 Mac OS X Aqua-based development tools 122 UNIX-based editors 122 (cid:1) Mac OS X-based editors 127 4.5 Apple’s GUI-based development tools 127 Apple Help Indexing Tool 128 (cid:1) AppleScript Studio 128 FileMerge 129 (cid:1) Icon Composer 132 Interface Builder 132 (cid:1) JavaBrowser 133 MRJAppBuilder 134 (cid:1) MallocDebug 135 (cid:1) ObjectAlloc 143 PEF Viewer 143 (cid:1) PackageMaker 144 (cid:1) Pixie 144 Project Builder 144 (cid:1) PropertyListEditor 144 Quartz Debug 146 (cid:1) Sampler 147 (cid:1) Thread Viewer 150 icns Browser 155 4.6 Apple’s command-line development tools 156 ps (process status) and top (system usage statistics) 156 sc_usage: showing system call usage statistics 158 fs_usage: reporting system calls and page faults related to the filesystem in real-time 160 (cid:1) gprof: displaying execution profile data 161 (cid:1) leaks: searching a process’s memory for unreferenced malloc buffers 163 (cid:1) heap: listing all the malloc-allocated buffers in the process’s heap 165 malloc_history: showing malloc allocations that a process hasperformed 165 (cid:1) sample: profiling a process during atimeinterval 166 4.7 Summary 167 www.it-ebooks.info

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.