Programming Mac OS X: A guide for Unix developers

pdf
Số trang Programming Mac OS X: A guide for Unix developers 385 Cỡ tệp Programming Mac OS X: A guide for Unix developers 15 MB Lượt tải Programming Mac OS X: A guide for Unix developers 0 Lượt đọc Programming Mac OS X: A guide for Unix developers 0
Đánh giá Programming Mac OS X: A guide for Unix developers
4.9 ( 11 lượt)
Nhấn vào bên dưới để tải tài liệu
Đang xem trước 10 trên tổng 385 trang, để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

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 GUIDE FOR UNIX 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 Greenwich, CT 06830 Fax: (203) 661-9018 email: orders@manning.com ©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 ■ Welcome to Mac OS X 3 2 ■ Navigating and using Mac OS X 27 PART 2 TOOLS ................................................................................... 55 3 ■ Project Builder and Interface Builder 4 ■ Development tools 57 109 PART 3 PROGRAMMING .................................................................. 169 5 ■ Objective-C and the Cocoa development frameworks 6 ■ Cocoa programming 7 ■ AppleScript programming 245 8 ■ Mac OS X and beyond v www.it-ebooks.info 203 279 171 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 1.1 Introduction 3 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 Menus 8 The Dock 10 Window layering 11 Dialog boxes 11 Drawers 12 Keyboard navigation 12 Other interface features 13 ■ ■ ■ ■ ■ 1.4 The Mac OS X architecture 13 Architecture layers 15 The kernel environment 16 Core Services layer 20 Application Services layer 21 Application Environment layer 22 Aqua 26 ■ ■ ■ 1.5 Summary 26 vii www.it-ebooks.info viii CONTENTS 2 Navigating and using Mac OS X 2.1 Introduction 2.2 Shells 2.3 Help system 32 Help Viewer 33 2.4 User accounts and privileges 33 27 28 29 Terminal features 31 Creating user accounts 34 2.5 Booting and default services 2.6 Programs and Mac OS X bundles 37 2.7 Security issues 2.8 File system Finder 2.9 36 39 39 41 Case sensitivity and pathname delimiters ■ Single-user mode 44 2.10 System log files 2.11 Processes management 2.12 Common commands and tools 46 2.13 Scripting languages AppleScript 43 45 45 48 48 2.14 Development tools 2.15 X Window under Mac OS X 2.16 UNIX to Mac OS X software projects 2.17 Summary 54 Installing the X server 50 51 52 53 PART 2 TOOLS ....................................................................... 55 3 Project Builder and Interface Builder 3.1 Introduction 57 58 Macintosh Programmer’s Workbench 59 THINK Pascal and THINK C 59 CodeWarrior Project Builder and Interface Builder 60 ■ 3.2 Creating an application with Project Builder www.it-ebooks.info 60 62 CONTENTS 3.3 Project Builder in depth 67 Targets and build styles 67 Project Builder’s UNIX tools 68 Project Builder’s interface 69 Project Builder scenarios 78 ■ ■ 3.4 Creating an application with Interface Builder Interface Builder scenarios 3.5 4 Summary 100 101 108 Development tools 109 4.1 Introduction 4.2 UNIX development tools under Mac OS X 110 112 Editors 112 Mac OS X editing tools 113 Version control 117 Static code analysis tools ■ 121 ■ 4.3 Compilers and build tools 4.4 Mac OS X Aqua-based development tools 122 UNIX-based editors 4.5 122 ■ 122 Mac OS X-based editors Apple’s GUI-based development tools 127 127 Apple Help Indexing Tool 128 AppleScript Studio 128 FileMerge 129 Icon Composer 132 Interface Builder 132 JavaBrowser 133 MRJAppBuilder 134 MallocDebug 135 ObjectAlloc 143 PEF Viewer 143 PackageMaker 144 Pixie 144 Project Builder 144 PropertyListEditor 144 Quartz Debug 146 Sampler 147 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 gprof: displaying execution profile data 161 leaks: searching a process’s memory for unreferenced malloc buffers 163 heap: listing all the malloc-allocated buffers in the process’s heap 165 malloc_history: showing malloc allocations that a process has performed 165 sample: profiling a process during a time interval 166 ■ ■ ■ ■ 4.7 Summary 167 www.it-ebooks.info ix
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.