Index

A Addresses ABI (application binary interface), 200 for libraries, 40 Absolute references, 433 symbols for, 35 Accented characters, 270 Agent applications, 433 Accessorizer application, 47 agerr function, 391 Accessors Aliasing, released-pointer, 357–359 for attributes, 52 All Configurations command, 177–178 for DataPoint, 226–227 All-in-one layout, 303–305 ACTION variable, 423 All Settings command, 177 Actions allDataPointsInContext method, 225–226, in controllers, 81–82 234, 276 defined, 433 AllowFullAccess key, 140 Active debugging, 23–32 AllowInternetPlugins key, 140 Active targets AllowJava key, 140 defined, 433 AllowNetworkAccess key, 140 indicator for, 115 AllowSystem key, 140 Activity Viewer command, 286 Ampersands (&) in searches, 416 ADC (Apple Developer Connection) And operators in searches, 416 downloading from, 420 Angle brackets () for ASCII property lists, membership in, 419–420 106 Reference Library in, 413–416 Annotate command, 195 Add buttons Antecedents in makefiles, 325 cross-development for, 208–209 APIs in cross-development, 418 for DataPoints, 81–82 AppDelegate class, 370 Add Localization button, 266–267 APPL type, 85 add method, 210 Apple Developer Connection (ADC) Add Target command, 50 downloading from, 420 Add to Bookmarks command, 288 membership in, 419–420 Add to Project command, 49 Reference Library in, 413–416 Add to Repository command, 196 AppleGlot glossaries, 274

441 442 Index

AppleScript and AppleScript Studio, 369 BBEdit editor, 102, 189, 194 application, 369–377 Big-endian notation, 214–217 dictionary, 400 Binaries, universal, 212–213 file paths in, 400 building, 217–218 interface for, 401–404 defined, 438 unit testing, 377–383 mixing SDKs, 218–219 AppleScript Inspector, 370–371 portability auditing in, 213–217 Application binary interface (ABI), 200 in , 337–338 Application bundles, 132–134 Binary format for Core Data, 233 Application Properties Info window, 84 Binary property lists, 107 Applications BinaryFormat category, 216–217 Cocoa. See Cocoa applications bindable property, 79 container hierarchy for, 401 Binding keys for, 136–138 prebinding, 39–40 prebound, 40 values, 80–81 properties for, 84–86 Bindings Inspector, 78–80 Applications folder, 420 Bookmarks Aqua human-interface guidelines, 64 in condensed layout, 306 Archived files in Project Window, 310 extracting, 386–387 setting, 288 tarballs, 385 Boolean data type and operators, 89–90 ARCHS variable, 426 for ASCII property lists, 106 Arranged objects in CodeWarrior project conversions, 319 defined, 433 in searches, 416 NSArrayController, 81 boxIntersect function, 391 Array command, 112 Braces () Array data types, 90, 106 for ASCII property lists, 106 array elements, 101 in formatters, 351 ASCII property lists, 106–107 Brackets () for ASCII property lists, 106 asPropertyList method, 92–93, 95, 227, 229 Brackets ([]) for message invocation, 59 Assembly code, 34–35 Breakpoints Associating data files, 84 adding, 26 Associative arrays, 90, 106 for AppleScript, 377 Atomic checkouts, 184 commands for, 352–354 _ _attribute_ _ extension, 322–323 conditions for, 354–355 Attributes, accessors for, 52 defined, 433 Attributes Inspector, 239 in editor panes, 288 Auditing portability, 213–217 indicator for, 24–25 Auto variables, 14 symbolic, 309, 345 awakeFromNib method, 210 in template functions, 347 Breakpoints command, 26 B Breakpoints window, 352–354 Backslashes (\) in macros, 108 Build command, 171, 175 Index 443

Build and Debug command, 25 keys for, 135–136 Build and Run command, 127 in Xcode, 333 build.html file, 388 Buttons Build Resources build phase, 296 cross-development for, 208–211 Build panel, 344 for DataPoints, 81–82 Build Resource Manager Resources build Interface Builder for, 63–64 phase, 296 Byte order compatibility, 214–217 Build Results window, 16–17 in condensed layout, 306 in default layout, 302–303 Cache memory, 413 for external projects, 390 CalculateRegression method, 120 in Xcode, 331–332 call method, 373 Build variables, 327–328, 423 Callahan, Kevin, 47 source trees, 430–431 canCompute method, 46, 54–55, 228, 230 splitting, 429–430 canCompute property useful, 423–429 checks on, 82 Building page, 304 in Regression model, 55 Builds, 331–332 Case sensitivity in all-in-one layout, 304 of file names, 407 bundle resource copying in, 333 in searches, 291 vs. CodeWarrior, 312–313 Categories for property lists, 90–93 configurations for, 276–278, 342–344, 433 CFAppleHelpAnchor key, 136 controllers, 87 CFBoolean type, 90 in data modeling, 235–236, 338–339 CFBundle type distributed, 365–366 for bundle access, 58 errors in, 15–18, 313 for localization, 266 external, 389–393 for working directories, 393 linkage in, 336–337 CFBundleDevelopmentRegion key, 136 rules for, 328–330 CFBundleDisplayName key, 136 source compilation in, 333–337 CFBundleDocumentTypes, 250 structural file copying in, 332–333 CFBundleExecutable key, 136 targets in, 294–295 CFBundleGetInfoHTML key, 173 universal binaries in, 217–218, 337–338 CFBundleGetInfoString key, 135, 173 BuildSystemCacheSizeInMegabytes key, CFBundleHelpBookFolder key, 136 409 CFBundleHelpBookName key, 136 BuildSystemMinimumRemovalAgeInHours CFBundleIconFile key, 134–135 key, 409 CFBundleIdentifier key, 134–135, 250 BUILT_PRODUCTS_DIR variable, 425 CFBundleInfoDictionaryVersion key, BUNDLE style, 429 134–135 Bundles, 58, 132 CFBundleLocalizations key, 138 application, 132–134 CFBundleName key, 137, 263 defined, 434 CFBundlePackageType key, 134–135 Info.plist file for, 134–140 CFBundleShortVersionString key, 134–135 444 Index

CFBundleSignature key, 134–135 layout, 63–67 CFBundleVersion key, 134–135 split, 71 CFData type, 90 window sizing, 67–71 CFDate type, 90 zombies in, 359–360 CFDictionary type, 90 Code completion, 286–287 CFExecutableName key, 410 Code-Fragment Manager (CFM) linkage, CFM (Code-Fragment Manager) linkage, 314 314 Code Sense feature CFMutableData type, 90 for class modeler, 301 CFMutableDictionary type, 90 description, 286–287 CFMutableString type, 90 with indexing, 368 CFNumber type, 90 for jumps, 285–286 CFPlugInDynamicRegistration key, 138 for Project Symbols smart group, 298 CFPlugInDynamicRegistrationFunction key, CodeWarrior projects 138 converting, 314–315 CFPlugInFactories key, 139 exporting in, 320–323 CFPluginTypes key, 139 importing in, 315 CFPlugInUnloadFunction key, 139 targets and configurations in, 315–318 CFShow method, 348 traps in, 319–320 CFString type, 90 targets in, 5 CFTypeRef type, 89–90 vs. Xcode. See Xcode and Xcode projects CFZombieLevel flag values, 360–361 collectStatistics method, 167–169 Changing code, version control for. See Colons (:) in file paths, 400 Version control Color CHUD package, 418 in custom views, 149–150 window, 299 syntax, 308 Class field for applications, 86 Command Line tool, 5, 14–15 Class modeler tool, 299–301 Commands, key mapping, 311–312 Classes, objects and methods in, 59 Comments in Targets group, 295 Classes group, 54 Commit command, 197 Clean All command, 200–201 Commit Changes command, 189 Clear Logs command, 346 Compare command, 194 CloseBoxInsetX key, 140 Comparing files, 189, 194 CloseBoxInsetY key, 140 Compatibility Cocoa applications byte, 214–217 controllers in. See Controllers Nib, 203–205 implementation Compatibility Checking window, 203 DataPoint class, 50–54 Compilation, 333, 338–339 Regression class, 54–58 dynamic loading in, 38–39 plan of action for, 43–48 linking in, 36–38 starting, 48–50 Linrg tool for, 33–36 views in, 61–62 prebinding in, 39–40 Interface Builder, 62–63 predictive, 364 Index 445

source code, 333–337 Controllers ZeroLink in, 40–42 actions and outlets, 81–82 Compile AppleScripts build phase, 295 application properties, 84–86 Compile Sources build phase, 35–36, 295, building, 87 326, 334–339 for custom views, 141–143 CompileC command, 334–337 Interface Builder for, 73–75 Compilers, 33 in MVC, 46–48 in CodeWarrior project conversions, 320 MyDocument, 82–84 for cross-development, 200 NSArrayController, 78–80 defined, 434 NSObjectController, 75–78 Compound type, 89–90 property lists, 98–100 compress method, 399 value binding, 80–81 Compressed archives, 385 Controllers panel, 74–75 Compute buttons, cross-development for, Converting CodeWarrior projects, 314–315 210 exporting in, 320–323 compute method, 208, 264–265 importing in, 315 computeFromLibrary method, 122 targets and configurations in, 315–318 computeWithLinrg method, 46, 54–55, 57 traps in, 319–320 Concurrent Versions Librarian (CVL), convertSize method, 162 196–197 Copy Bundle Resources build phase, 295, Condensed layout, 305–306 411 Conditions for breakpoints, 354–355 Copy Files build phase, 295 CONFIGURATION variable, 423 Copy Headers build phase, 295 Configurations Copy Implementations to Clipboard for builds, 276–278, 342–344, 433 command, 228 in CodeWarrior project conversions, Copy items into destination group’s folder 315–318 (if needed) option, 294 ./configure command, 387–388 copying files, 295, 332–333 Configure Options command, 415 Copyright notices, 53 configurePersistentStoreCoordinatorFor- Core Data, 221 URL method, 254, 257–258 build and run in, 235–236, 240–241 Connections Inspector, 205 data modeling in, 221–224 Console command, 26 DataPoints in, 225–227 Console Log command, 348 entities in, 237–238 Consolidating targets, 316–318 human interface in, 238–240 Constructors in C++, 309 Interface Builder in, 234–235 contentObject property, 78 for metadata, 254–258 Contents directory, 132–133 MyDocument in, 232–233 CONTENTS_FOLDER_PATH variable, 425 regression in, 228–232 Contents of variables, 24, 29–30, 346–347, Core Foundation, zombies in, 360–361 377 Correlation coefficients Continue building after errors option, 313 defined, 434 Continue command, 26 in linear regression, 11–13 446 Index correlation key, 92 CustomView class, 143–144 correlation method, 170 CVL (Concurrent Versions Librarian), correlationCell method, 205 196–197 countDataPoints method, 233 CVL Tag dialog box, 197 countOfDataPoints method, 228 CVS software, 183–185 CpResource command, 333 repositories for, 186–189 crazy.dot file, 396–400 tagging in, 195–197 Create Files for LinearGraph command, 144 CVSLinear directory, 193 Create Folder References for any added CVSLinear module, 191–193 folders option, 293–294, 411 CVSROOT directory, 187–189, 193 CreateUniversalBinary command, 337–338 cvswrappers file, 187–189 Creator field for applications, 85 D for frameworks, 173 Dashboard widgets, 139 Credits.rtf file, 266–267 Data data type, 89–90, 106 Cross-development, 199 Data files, associating, 84 for buttons, 208–211 Data modeling, 221–224 defined, 434 adding entities, 237–238 feature availability in, 212 building in, 235–236, 338–339 Nib compatibility in, 203–205 for DataPoint, 225–227 NSTableDataSource in, 205–208 human interface, 238–240 SDKs for, 199–202 Interface Builder for, 234–235 testing, 211 for MyDocument, 232–233 universal binaries for. See Universal for Regression, 228–232 binaries running in, 240–241 Cross-development kits, 418 tables in, 241–242 CSResourcesFileMapped key, 136 Data types, 89–90 Curly braces () dataExtent method, 152, 154–155 for ASCII property lists, 106 DataPoint class in formatters, 351 creating, 50–54 Custom build rules, 328–330 modeling for, 225–227 Custom Class panel, 73 NSArrayController, 78–81 Custom executables, debugging, 393–396 property lists for, 90–93 Custom formatters, 349–352 DataPoint.h file, 51–52, 54 Custom views DataPoint.m file, 51, 54 coding, 149–156 DataPoint-PropertyList.h file, 92–93, 95 controllers for, 141–143 DataPoint-PropertyList.m file, 95 creating, 143–146 dataPointAtIndex method, 147, 158, 233, debugging, 159–163 350–351 delegate design patterns for, 146–149 dataPoints array, 79 showing, 156–157 dataPoints method, 228 testing, 157–159 dataPoints property, 78 Customized Settings collection, 278 dataRepresentationOfType method, 207, 232 Index 447

Date data type, 89–90 Destructors in C++, 309 Dead-code, stripping, 278–279 Detail lists, 6–7 dealloc method, 142, 147, 231 Detail searches, 95 Debug Executable command, 23 Developer Technical Support, 419 Debugger Console, 345, 348 Development build style, 41 Debugger method, 296 Diagrams, class model, 300 Debugging, 377 dict elements, 101 in all-in-one layout, 305 Dictionaries in AppleScript, 377–383 AppleScript, 400 breakpoints in. See Breakpoints for property lists, 104 custom executables, 393–396 regression, 101 custom formatters for, 349–352 Dictionary command, 112 custom views, 159–163 Dictionary data type, 89–90 dead-code stripping in, 278–279 diff listings, 189, 195 in debugger window, 16, 18, 20–21, 26 Direct Dependencies listing, 50 lazy symbol loading, 355–356 Directories Linrg tool, 18–21, 23–32 for frameworks, 175–179 printing values in, 348–349 for project files, 6, 9–10 techniques, 345–347 trimming, 405 template classes for, 308–309 working, 392–393 zombies, 356–361 Disclosure triangles, 7 Debugging flag, 19 in class model diagrams, 300 DebugStr method, 296 in localization, 266 Declarations, location of, 14 in Project Find window, 290 default.pbxuser file, 408 in Project group, 292 Defaults in Targets group, 295 layout, 302–303 Disk images, converting, 420 for windows, 409 Distributed builds, 365–366 in Xcode, 343 do shell script command, 372 definesLineOfSlope method, 147, 158 Dock setup, 420–421 Delegates Document key, 136 for AppleScript, 370, 373 Document object, 75–76 design pattern for, 146–149 Documentation, 413–414 Dependencies Documentation window, 414–416 defined, 434 searching, 42, 415–416 for Linrg tool, 123–125 updates, 416 listing, 50 Double-quote characters (") for ASCII in makefiles, 325 property lists, 106 rules for, 385 drawRect method, 145, 152, 160 in Xcode, 326 DYLD_IMAGE_SUFFIX variable, 346 DEPLOYMENT_POSTPROCESSING DYLIB variable, 423 variable, 428 Dynamic libraries, 39 DERIVED_FILE_DIR variable, 329, 425 and Frameworks. See Frameworks 448 Index

Dynamic libraries (continued) Examining variables, 24, 29–30, 346–347, loading, 39 377 Dynamic loading Exclamation points (!) in searches, 416 defined, 434 Executable field, 84, 172 standard routines, 38–39 EXECUTABLE variable, 423 DYNAMIC style, 429 EXECUTABLE_FOLDER_PATH variable, 425 E EXECUTABLE_NAME variable, 429 Edges EXECUTABLE_PATH variable, 429 defined, 434 EXECUTABLE_PREFIX variable, 429 graph, 386 EXECUTABLE_SUFFIX variable, 429 Edit Active Target command, 316 EXECUTABLES_FOLDER_PATH Edit menu, 263 variable, 425 Edit Project Settings command, 318, 343 Executables group, 296–297 Editable property, 80 Executables in project hierarchy, 401 Editing page, 304 Exporting symbols, 320–323 Editing text, 413 Expressions window, 346 Editor panes, 285 Extensions field for applications, 86 Code Sense, 286–287 Extents, 35 editor modes in, 289–290 External build systems, 385, 389–393, 434 jumps in, 285–286 External-symbols files, 321–322 navigation bar in, 287–289 Extracting archived files, 386–387 Editor windows, 16 Enable Data Formatters command, 351 F Enable for all projects option, 367 Fat binaries, 337 encodeWithCoder method, 53, 228 Fat bundles, 133 Encryption, 4 Favorites bar, 291–292 English.lproj directory, 266 FBundleDocumentTypes key, 136 Entities FBundleURLTypes key, 136 adding, 237–238 fetchUniqueColumn method, 255–256 defined, 434 File-difference tools, 189 env command, 423 File menu, 263 Errors and warnings File names, case sensitivity of, 407 in builds, 15–18, 313 File paths in AppleScript, 400 in CodeWarrior project conversions, FileMerge utility, 190, 194 315 Files in condensed layout, 306 archived, 385–387 for external build projects, 390 associating, 84 in Project Window, 310 comparing, 189, 194 in Xcode, 335 header. See Header files ESELLERATE_DIR variable, 430–431 including, 400 eSellerate libraries, 430–431 project, 6, 9–10 Events for AppleScript, 370 in project hierarchy, 401 Index 449

resource, 129 gcc tool File’s Owner icon, 62–63 for cross-development, 200 FileVault feature, 4 for frameworks, 175–179 fillOutputCells method, 207 installing, 417 Filters, 299 libstdc++ for, 408 Find Results group, 306 performance of, 307 First Responders GCC_VERSION variable, 426 defined, 434 GD_drawing macro, 394–395 in Interface Builder, 62–63 GD_IGP_INLINE symbol, 399 in responder chains, 96–97 gdb tool, 18–19, 348–349, 393–394 Fix command, 26 gdImageBoundsSafeMacro macro, 399 Fix & Continue command gdImageGetPixel method, 397–399 limitations of, 29 genstrings utility, 272 working with, 343–344 Get Info window, 49, 123, 194, 245 fix_prebinding tool, 40 GetMetadataForFile.c file, 251–253 Floating-point registers, 35 Getter methods, 52 Folders, references for, 411 GIFNextPixel method, 397–398 Font key, 140 Global variables, examining, 346 Force Directed Layout command, 300 Glossaries, AppleGlot, 274 Formatters, custom, 349–352 Go to header/source file command, 312 Forms, sizing, 69–70 Goals in makefiles, 325 fr.lproj file, 267 Graph buttons, cross-development for, 210 Frameworks, 165 graph_init method, 395 defined, 435 Graph window directories for, 175–179 coding, 149–156 prebinding, 181–182 debugging, 159–163 private, 179–181 showing, 156–157 structure of, 171–173 testing, 157–159 targets, 166–167 GraphColors.plist file, 150–153 working with, 173–175 Graphs and Graphviz, 142, 386 FRAMEWORKS_FOLDER_PATH debugging, 393–396 variable, 425 defined, 435 FreeType library, 389 external build projects for, 389–393 Full-text searches in documentation, including files for, 400 415–416 performance of, 396–400 preparing for, 386–389 G GraphWindow.nib file, 269–270 Garden project, 356–361 Group-relative path types, 401 GCC_PREPROCESSOR_DEFINITIONS Grouped/Ungrouped control, 289–290, variable, 426 313–314 GCC_PREPROCESSOR_DEFINITIONS_ Groups & Files list, 292 NOT_USED_PRECOMPS variable, in condensed layout, 305–306 341 Executables group in, 296–297 450 Index

Groups & Files list (continued) Regression class, 54–58 Project group in, 292–294 Importing Smart groups in, 297–298 CodeWarrior projects, 315 Symbols smart group in, 298–299 defined, 435 Targets group in, 294–296 metadata, 258–261 Groups in project hierarchy, 401 into repositories, 191 Include in Index checkbox, 404 H Including files, 400 Has-a relationships, 224 Index templates, 367, 435 hasWhitespace method, 375 Indexes Header files for class modeler, 301 ambiguity of, 408 for Code Sense, 286 in frameworks, 166 for Project Symbols smart group, 298 precompiled, 333 for projects, 367–368, 404 defined, 436 Info key, 135–137 for performance, 363–364 Info.plist file, 134–140, 250, 332–333 sharing, 409 Info windows, 310 Header menu in editor panes, 289 INFOPLIST_FILE variable, 428 HEADER_SEARCH_PATHS variable, 427 INFOPLIST_PREPROCESS variable, 428 Height key, 140 InfoPlist.strings file, 270–271 Hello, World project Informal protocols, 60, 146, 435 creating, 4–9 Ingredients dictionary, 104 directories for, 9–10 init command, 187 Help key, 136 init_ugraph method, 395 Hide Others command, 62 initDPI method, 394–395 Hide Status Bar command, 413 Initializers in DataPoint, 226 Hide XCode command, 311–312 initWithCoder method, 53, 145, 228 Hierarchies initWithEntity method, 231 container, 401 initWithFrame method, 145 settings, 340–342 initWithX method, 226 History in editor panes, 288 Input files, 331 HTML.xctxtmacro macro, 108 Input pipes, 57 Human interface in data modeling, 238–240 Inspector panel, 68 INSTALL_DIR variable, 428 I INSTALL file, 387–388 IBOutlet class, 75–76, 142, 145 INSTALL_GROUP variable, 428 Icon File field, 85–86 INSTALL_MODE_FLAG variable, 429 Identifiers INSTALL_OWNER variable, 428 for applications, 85 INSTALL_PATH variable, 428 in dictionaries, 108 INSTALL_ROOT variable, 428 for frameworks, 172 Installing Xcode, 417–421 Implementation of Cocoa applications Instruction Scheduling setting, 409 DataPoint class, 50–54 Instruction streams, caches for, 413 Index 451

Integer command, 111 for dashboard widgets, 139 processor compatibility, 214–217 for Java, 139 intercept key, 92 for plug-Ins, 138 intercept method, 170 for preference panes, 139 interceptCell method, 205 kMDItemContentType tag, 245 Intercepts of regression lines, 13 kMDItemContentTypeTree tag, 245 Interface Builder (IB), 61–63, 241 kMDItemFSCreationDate tag, 245 with AppleScript Studio, 369 KVC protocol compatibility browser in, 203–205 for properties, 47 for controllers, 73–75 setters and getters in, 52 for data modeling, 234–235 KVO (key-value observing) protocol folder for, 420 in value binding, 80 for layout, 63–67 in variable watching, 347 for views, 143–144, 412 Intermediate files L directories for, 329 Labels for buttons, 64 and encryption, 4 Landmarks, 288 Intrinsic libraries, 408 Large projects. See Graphs and Graphviz Launch Behavior key, 137–138 J Layout J2SE documents, 418 in Cocoa applications, 63–67 Java programming project Java Development Kit for, 418 all-in-one, 303–305 keys for, 139 condensed, 305–306 Jumps default, 302–303 in editor panes, 285–286 Layout key, 140 navigation bar for, 288 Lazy symbol loading, 355–356 JUnit, 383 Ld linker, 279, 336–337 Leaks, memory, 274–276 K Libraries Keep in Dock command, 421 ADC Reference Library, 413–416 Key Bindings panel, 107, 311 in cross-development, 418 key elements, 101 designing, 116–121 Key mapping, 311–312 dynamic, 39. See also Frameworks Key-value coding (KVC) protocol examining, 125–127 for properties, 47 for Graphviz, 386 setters and getters in, 52 intrinsic, 408 key-value observing (KVO) protocol limitations of, 165 in value binding, 80 in linking, 37 in variable watching, 347 loading, 39 Keys prebinding, 40 for applications, 136–138 running, 127–128 for bundles, 135–136 symbolic links to, 407 452 Index

LIBRARY_SEARCH_PATHS variable, 427 running, 127–128 LIBRARY_STYLE variable, 429 linking, 36–38 libRAverage.c file, 121, 125 localization in, 266–274 libRegression.a file, 115 memory usage in, 274–276 libRegression.c file, 118, 125 modifying, 121–122 libRegression.h file, 116, 125 plan of action for, 43–48 libRPrivate.h file, 118, 125 property lists for. See Property lists libstdc++ file, 408 release build configurations for, 276–278 Licensing, 419 singularity in, 264–265 Linear regression, 11–13, 435. See also targets for, 115–116, 123–125 Linrg tool and Linear project trimming menus for, 263–264 LinearData.xc model, 237 version control for, 191–193 LinearGraph class, 141–143 views for. See Custom views coding, 149–156 xcodebuild for, 279–280 delegate design patterns for, 146–149 List data type, 106 view for, 143–144 Lists, property. See Property lists working with, 145–146 Little-endian notation, 214–217 LinearGraph.h file, 166 loadDataRepresentation method, 207, 232 LinearGraph.m file, 166 Loading Link Binary With Libraries build phase, 37, standard routines, 38–39 124, 295, 408 symbols, 355–356 Linking group command, 181 Localizable.strings file, 272–274 Links and linking Localization, 266 defined, 435 Credits.rtf for, 266–267 libraries, 407 GraphWindow.nib for, 269–270 Linrg tool, 36–38 InfoPlist.strings for, 270–271 in Nib, 74 Localizable.strings for, 272–274 weak-linking, 212 MainMenu.nib for, 267 in Xcode, 336–337 MyDocument.nib for, 267–269 ZeroLink for, 366–367 testing, 271–272 Linrg tool and Linear project, 14–15 Localization key, 136, 138 auditing, 214–217 localizedStringForKey method, 272 build errors with, 15–18 Locally Modified files, 197 cleaning up, 194–195 Lock button, 289 Cocoa applications for. See Cocoa Logs in debugging, 346 applications long int type in CodeWarrior conversions, compiling, 33–36 319 data modeling for, 228–232 Low, Glen, 386 dead-code stripping, 278–279 .lproj suffix, 133 debugging, 18–21, 23–32 LSBackgroundOnly key, 137 libraries for LSEnvironment key, 137 designing, 116–121 LSGetAppDiedEvents key, 137 examining, 125–127 LSHasLocalizedDisplayName key, 137 Index 453

LSMinimumSystemVersion key, 137 Mapping keys, 311–312 LSMultipleInstancesProhibited key, 137 Material dictionary, 104 LSPrefersCarbon key, 137 mdimport tool, 258–259 LSPrefersClassic key, 137 mdls tool, 243 LSRequiresCarbon key, 138 meanX method, 169 LSUIElement key, 138 meanY method, 169 LSUIPresentationMode key, 138 Memory LSVisibleInClassic key, 138 for addresses, 35 cache, 413 M managing, 357–358 MacBinary format, 420 usage checking, 274–276 Mach-O linker Menus, trimming, 263–264 in CodeWarrior conversions, 314–315 Message invocation, 59, 435 universal binaries for, 212 Metadata Machine code, 35 Core Data for, 254–258 MACOSX_DEPLOYMENT_TARGET defined, 435 variable, 428–430 displaying, 243–246 Macros Metadata plug-ins, 249 in CodeWarrior conversions, 320 MetaLinear project files for, 249–253 preprocessor, 317 packaging, 254 for property lists, 107–113 testing, 258–261 main.c file, 6–7 MetaLinear project files, 249–253 main.m file, 369 Methods main menu bars, 85 class, 59 MainHTML key, 140 setter, 52 MainMenu.nib file Standard Libraries (MSL), 315 in AppleScript applications, 369–370, 372 Mixing SDKs, 218–219 contents of, 61, 85, 93–94 Model-View-Controller (MVC) design for localization, 267 pattern, 43–44 trimming, 263–264 controllers in, 46–48 Make File Localization button, 269 models in, 44–46 Make Layout Default command, 409 views in, 48 Make subviews of command, 71 Models make tool, 385 data. See Data modeling makeCompoundEdge function, 391 in MVC, 44–46 Makefiles NSObjectController, 77–78 defined, 435 property lists, 90–100 dependencies in, 385 modeN files, 408 for external build projects, 390–391 Modern bundles goals in, 325 contents of, 132 MallocDebug application, 274–275 defined, 435 Managed-object model (.mom) files, 222 Modules, 436 managedObjectContext property, 234 .mom (managed-object model) files, 222 454 Index

MSL (Metrowerks Standard Libraries), 315 New Standard Tool Assistant, 6 Multibyte Unicode encodings, 214 New Symbolic Breakpoint command, 345 Multiple targets, 409 New Target Assistant, 115–116 MVC (Model-View-Controller) design New User Assistant window, 3–4 pattern, 43–44 Newlines in macros, 108 controllers in, 46–48 Nib files, 61 models in, 44–46 compatibility in, 203–205 views in, 48 defined, 436 MyCompanyName file, 53 Interface Builder with, 73–74 MyCompanyName.applescript file, 369–371 nm tool, 125–126 MyDocument file, data modeling for, No-optimization flag, 19 232–233 Nodes MyDocument.m file, 82–84 defined, 436 MyDocument.nib file graph, 386 contents of, 61–62 Not a number (NaN) value for localization, 267–269 defined, 436 MyDocument window, 65–66 operations with, 23 NSAlert class, 265 N NSAppleScriptEnabled key, 138 Names NSArray class, 90 for applications, 86 NSArrayController class, 74, 76, 205, 238, for buttons, 64 241–242 NaN (not a number) value Add button for, 81–82 defined, 436 DataPoints, 78–80 operations with, 23 NSAssert macro, 152 NATIVE_ARCH variable, 426 NSBoolean class, 90 Navigation bars, 287–289 NSBundle class ncurses library, 347 for bundle access, 58 neato executable in localization, 266 on crazy.dot, 397–400 for working directories, 393 working with, 394–396 NSByteOrder.h file, 216 Negate operators in searches, 416 NSColor class, 149 Network numbers, portability of, 214 NSControl class, 81 New Application menu, 263 NSController class, 74, 76, 203 New Custom Executable command, 296, 392 NSData class, 90 New Data Model File Assistant, 222 NSDate class, 90 New File Assistant, 51 NSDictionary class, 90 for class modeler, 301 for AppleScript, 375 for property lists, 91 for point lists, 92 for targets, 117 NSDocument class, 46, 204 New Project Assistant, 4–5 in cross-development, 201 New Project command, 48 for packages, 131 New Shell Script Build Phase command, 330 NSEntityDescription class, 221 Index 455

NSForm class, 66, 80 NSTableColumn class, 234–235, 239 NSGraphicsContext class, 160 NSTableDataSource class, 205–208, 286 NSHumanReadableCopyright key, 137, 173 NSTableView class, 65, 81, 205, 239, NSJavaNeeded key, 139 241–242 NSJavaPath key, 139 NSTableView.h file, 205 NSJavaRoot key, 139 NSView class, 65, 142–143 NSKeyedArchiver class, 83, 236 NSWindow class, 65 NSKeyedUnarchiver class, 83 NSWindowController class, 201–202 NSLocalizedString class, 272–273 NSZombieEnabled switch, 359 NSMainNibFile key, 138 Number data type, 89–90 NSManagedObject class, 221, 225 numberOfRowsInTableView method, 206 NSManagedObjectContext class, 221, 229, 252 O NSManagedObjectModel class, 221–222 ObjCUnit framework, 383 NSMatrix class, 66 OBJECT_FILE_DIR_normal variable, NSMutableArray class, 46, 90, 92 426 NSMutableData class, 90 Object files NSMutableDictionary class, 75, 90 defined, 436 NSMutableString class, 90 examining, 126–127 NSNumber class, 90, 92, 234 machine code in, 37 NSNumberFormatter class, 234–235 Objective-C NSObject class, 45–46, 147, 201 working with, 59–60 NSObjectController class, 74, 234 ZeroLink for, 41 Document object, 75–76 Objects Model object, 77–78 arranged, 81 NSOpenPanel class, 407 class, 59 NSPersistentDocument class, 232, 254 objectValueForTableColumn method, 206 NSPersistentStoreCoordinator class, 252 OBJROOT variable, 424 NSPrefPaneIconFile key, 139 OCUnit framework, 378–379 NSPrefPaneIconLabel key, 139 ocvs command, 186, 191 NSPrincipalClass key, 136 Omelet property list, 103–106 NSPropertyListSerialization class, 375 openStepFormat method, 376 NSRTFDPboardType class, 130 Optimization. See Performance NSSavePanel class, 201 Or operators in searches, 416 NSScrollView Inspector, 205 Ordered list data type, 89–90 NSSearchField class, 269 OS Types field, 86 NSServices key, 138 OTHER_CFLAGS variable, 426 NSSize structure class, 59 OTHER_CFLAGS_normal variable, 427 NSString class, 90 Other Linker Flags command, 181 for AppleScript, 375 otool command, 126–127 with NSNumberFormatter, 234 Outlets in controllers, 81–82 NSSwappedDouble class, 216 Output files, 331 NSSwappedFloat class, 216 Output pipes, 57 456 Index

P Plug-ins Package field, 86 keys for, 138–139 PACKAGE_TYPE variable, 423–424 metadata Packaged archives, 385 MetaLinear project files for, 249–253 Packages, 129–130 packaging, 254 defined, 436 testing, 258–261 for Metadata plug-in, 254 Plugin key, 140 RTFD, 130–132 Pointers Pane splitter, 289 aliasing, 357–359 Parentheses ( ) for ASCII property lists, to variables, 21 106 points key, 92 parseOldPlist method, 373, 376 pointsAllTheSame method, 264 Path types, 401 PointStat class, 166–171 pathForResource method, 58 Portability, auditing, 213–217 Pause command, 26 Position of windows, 409 PBXCp operations, 332, 338–339 #pragmas, 319 .pbxproj files, 408 #pragma export, 320–322 .pbxuser files, 408 #pragma mark, 53, 205 PER_ARCH_CFLAGS_ppc variable, 427 Prebinding, 39–40 Per file compiler flags, 319 defined, 436 Perforce program, 184 frameworks, 181–182 Performance, 412–413 Precompilation, header, 333 distributed builds for, 365–366 defined, 436 of Graphviz, 396–400 for performance, 363–364 prebinding for, 39–40 sharing, 409 precompiled headers for, 363–364 Precompile Prefix Header switch, 363–364 predictive compilation for, 364 Predictive compilation, 364 project indexing for, 367–368 Preference panes, keys for, 139 in Xcode projects vs. CodeWarrior, Preferences window, 4 307–308 Prefix files ZeroLink for, 40–42, 366–367 defined, 436 Pipes, 57 for precompiled headers, 363–364 Pixels, 162 Preprocessor Macros Not Used In PkgInfo file, 332–333 Precompiled Headers, 409–410 Place Accessor Decls on Clipboard Preprocessors in CodeWarrior conversions command, 47 macros for, 317 Place Accessor Defs on Clipboard command, symbols in, 320 47 traps in, 319 Plan of action for Cocoa applications, 43–48 Print Description to Console command, 348 .plist files and forms, 90, 375 Printing values, 348–349 for AppleScript, 374–375 Private frameworks, 179–181 editing, 101–102 Private headers, 171 parameters for, 410 ProcessPCH command, 333 Index 457

Products, 436 defined, 437 Program tasks, 43 models, 90–100 PROJECT_DIR variable, 423 as text, 100–106 Project directory property, 400 text macros for, 107–113 PROJECT_FILE_PATH variable, 423 views, 93–98 Project Find window, 290–291 Protocols, 146 Project group, 292–294 defined, 437 Project headers, 171 informal, 60, 146, 435 Project menu, 310 Public headers, 171–172 PROJECT_NAME variable, 423 Project objects, 400 Q Project Symbols group, 298–299 Question marks (?) for UTF characters, 273 in condensed layout, 306 Quick Model command, 392 details view in, 95 Quit Xcode command, 8 Project window Quote characters (") for ASCII property source code in, 16 lists, 106 in Xcode projects vs. CodeWarrior, 309–311 Projector system, 193 Rapid application-development (RAD) tools, Projects 309 in application hierarchy, 401 rbreak command, 308–309, 347 CodeWarrior. See CodeWarrior projects readFromFile method, 131 creating, 4–9 README file, 387–388 defined, 436 Real command, 111 files for Rebuild Code Sense Index option, 368 defined, 437 Red file names, 196 directories for, 6, 9–10 Reference-counted object types, 89–90 indexes for, 367–368, 404 Reference Library, ADC, 413–416 large. See Graphs and Graphviz refreshData method, 147–148, 167–168 layouts for Registers, 35 all-in-one, 303–305 Regression, 435. See also Linrg tool and condensed, 305–306 Linear project default, 302–303 Regression class starting, 48–50 interface for, 45–46 Properties modeling for, 54–58 application, 84–86 property lists for, 90–93 key-value coding for, 47 Regression dictionary, 101 Property List Editor, 102–106 Regression.h file, 54, 228 Property lists, 89 Regression lines, 11–13, 437 ASCII, 106–107 Regression.m file, 54, 230 binary, 107 Regression-PropertyList.h file, 95 controllers, 98–100 Regression-PropertyList.m file, 91–92, 95 data types, 89–90 regressionValid method, 170 458 Index

Regular expressions, 291, 392 Rules, build, 328–330 Reindexing projects, 404 Rules pane, 200–201 Relationships for entities, 237–238 Run Executable command, 393 Release builds, configurations for, 276–278 Run Log window Released-pointer aliasing, 357–359 debugging in, 18–19, 393 Remove buttons, cross-development for, for default layout, 303 208–209 Run Script build phase remove method, 210 build variables in, 423 Repositories description, 330–331 defined, 437 for version control, 185–191 S Resizing saveAsPList method, 94–98, 201–202 forms, 69–70 Scalar data types, 89–90 graphs, 144 scanf function, 21, 36–37 windows, 67–71 schema.strings file, 251 Resource files, 129, 437 schema.xml file, 250–251 Resource forks, 129 SCM (software configuration management) Resource Manager, 129 system Resources, 437 defined, 437 Responder chains purpose of, 183–184 defined, 437 SCM group in condensed layout, 306 operation of, 96 SCM Results window, 303 Restart command, 26 Script Editor, 369, 400 Reveal in Group Tree command, 392 Scripts. See AppleScript and AppleScript Revision control, 183–185 Studio cleaning up files in, 194–195 SDKROOT variable, 218–219, 424, 429 for Linear, 191–193 SDKs (software development kits) repository for, 185–191 cross-development, 199–202 tagging in, 195–197 mixing, 218–219 RGAddPoint method, 119 Searches RGCorrelation method, 121 detail, 95 RGCount method, 120 in documentation, 42, 415–416 RGCreate method, 118 for strings and symbols, 290 RGDeletePoint method, 119 Security key, 140 RGIntercept method, 121 Select Object command, 203–204 RGMeanX method, 121 Semicolons (;) for ASCII property lists, 106 RGMeanY method, 121 SenTestCase class, 379 RGRelease method, 119 Set Active Build Configuration command, RGSlope method, 120 316 Rich text file directory (RTFD), 130–132 Set Active Target menu, 123 Role field, 86 setAllowedFileTypes method, 202 Roots of bundles, 140 setBounds method, 152, 160 RTFD package, 130–132 setDataPoints method, 228 Index 459 setDelegate method, 147–149, 158, 170 Sliders, 412 setenv commands, 331 slope key, 92 setKeys method, 55, 202 slope method, 170, 228–229 setMessageText method, 265 Slope of regression lines, 13 setMetaData method, 255 slopeCell method, 205 setMetaDataForStoreAtURL method, Smart groups in Groups & Files list, 297–298 255–257 Software configuration management (SCM) setSlope method, 229 system setter methods, 52 defined, 437 Settings hierarchy, 340–342 purpose of, 183–184 setValue method, 232 Software development kits (SDKs) setX method, 226–227 cross-development, 199–202 setY method, 226–227 mixing, 218–219 Shared Libraries window, 355–356 Source code, 33 sharedRegressionInContext method, compiling, 333–337 229–230, 232 defined, 437 Sharing precompiled headers, 409 Source Control window, 16 Shark statistical profiler, 396–399 Source trees, build variables, 430–431 shell command, 372 Speed. See Performance Shell Script build phase, 295, 385 Split View command, 71 Show Build Settings Notes command, 320, Splitting build variables, 429–430 411, 423 Spotlight metadata system, 243 Show Expert Preferences Notes command, Core Data for, 254–258 411 data for, 243–246 Show Favorites Bar command, 291 plug-in for, 249–254 Show Info command, 64 testing importer for, 258–261 Show Inspector command, 68, 194 UTIs for, 246–249 Show Package Contents command, 130, 180 SQL format, 233 Show Relationships command, 237 Square brackets ([]) for message invocation, showGraphWindow method, 142 59 Simple Regular Expression Smart Group SRCROOT directory, 329 command, 297, 392 SRCROOT variable, 424 Singularity, avoiding, 264–265 Stacks Size in debugging, 345 forms, 69–70 for variables, 29 graphics, 162 Standard I/O Log window, 19, 28 graphs, 144 Standard routines, dynamic loading of, windows, 67–71, 409 38–39 Size Inspector Standard Tool, 5–6 for graphs, 144 Starting projects, 48–50 for windows, 68–69 Static libraries Size panel, 68 in CodeWarrior project conversions, 319 Skip Install option, 180 limitations of, 165 460 Index

Static models, 300, 437 symbol, 125–126, 438 STATIC style, 429 tableView method, 206–207 Statistical profilers, 396–399 Tabs in macros, 108–109 Statistics.framework, 177–181 Tags Statistics-Info.plist file, 172 defined, 438 stdDeviationX method, 169–170 in version control, 195–197 stdDeviationY method, 169–170 tar tool, 385, 387 Step Into command, 26, 41–42 Tarballs, 385 Step Out command, 26 TARGET_BUILD_DIR variable, 425 Step Over command, 26–27 Target Info window, 50, 363 Store Type field, 86 TARGET_NAME variable, 425 storeChanged method, 231, 352–354 Targets, 4–5 Strings, 89–90 adding, 115–116 for ASCII property lists, 106 CodeWarrior, 5 searching for, 290 in compilation, 35–36 .strings file, 270, 272–274 in condensed layout, 306 Structure key, 136, 138, 140 consolidating, 316–318 Structured directory trees, 132 defined, 438 _ _stub_getrealaddr method, 397, 399 dependent, 123–125 Subversion program, 183–184 frameworks, 166–167 sudo command, 185–186 multiple, 409 Symbol tables in project conversions, 315–318 defined, 438 in Project group, 292–293 examining, 125–126 in project hierarchy, 401 Symbolic breakpoints, 309, 345 in Project window, 311 Symbolic counterparts, 289 in Xcode, 326–327 Symbolic links to library, 407 Targets group, 294–296 Symbols Templates compiler, 35 breakpoints in, 347 defined, 438 debugging, 308–309 in dynamic loading, 39 index, 367, 435 exporting, 320–323 Terminal application, 9 indexing, 367–368 folder for, 420 lazy loading of, 355–356 for repositories, 185 searching for, 290 Terminate command, 25 Symbols smart group, 298–299 Test cases, 379–382 SYMROOT variable, 425 Test Interface command, 67 Syntax coloring, 308 testHasWhitespace method, 379–380 System frameworks, 176 Testing custom views, 157–159 T localization, 271–272 Tables metadata plug-ins, 258–261 in data modeling, 241–242 unit. See Unit testing Index 461 testQuotation method, 380–381 mixing SDKs, 218–219 Text portability auditing in, 213–217 editing, 413 in Xcode, 337–338 property lists as, 100–106 Universally unique identification (UUID) Text editors, 287 strings, 249 Text macros, 107–113 UNLOCALIZED_RESOURCES_ Tiger operating system, 221 FOLDER_PATH variable, 425 Tips, 409–413 Unprototyped functions, 41 Toggle Debugger Layout command, 345 Unused code, stripping, 279 Tool sets, downloading, 420 Unzipping files, 387 Toolbars, 26 Update command, 195 Tools.mpkg icon, 420 Updates Tracking models defined, 438 defined, 438 documentation, 416 working with, 300–301 revision, 195 TraverseDirectory handler, 401, 405 URLs, keys for, 136 Tree analysis, 397–398 USE_HEADERMAP variable, 427 triggerChangeNotificationsForDependent- Use Predictive Compilation command, Key method, 55 364 Trimming USE_SEPARATE_HEADERMAPS directories, 405 variable, 408, 428 menus, 263–264 UsePerConfigurationBuildLocations setting, Type field 411 for applications, 85 UTExportedTypeDeclarations array, for frameworks, 172 247–248 Types, 89–90 UTF-16 Unicode, 273 UTI and MIME Types field, 86 U Utilities folder, 420 Umbrella frameworks UTIs (uniform type identifiers), 86, 245–249 contents of, 176 UTTypeDescription key, 248 defined, 438 UTTypeTagSpecification dictionary, 248 Unicode encodings, 214, 273 UUID (universally unique identification) Uniform type identifiers (UTIs), 86, 245–249 strings, 249 Unit testing, 377–378 defined, 438 V OCUnit for, 378–379 VALID_ARCHS variable, 426 options for, 383 Value panel, 25 test cases for, 379–382 Values UnitKit framework, 383 binding, 80–81 Universal binaries, 212–213 printing, 348–349 building, 217–218 $VAR message, 351 defined, 438 Variable pane, 28 462 Index

Variables setting, 346–347 build, 327–328, 423 wchar_t type, 319 source trees, 430–431 Weak links splitting, 429–430 behavior of, 212 useful, 423–429 defined, 438–439 custom formatters for, 349–352 Width key, 140 declaration location for, 14 Window icon, 62 examining, 24, 29–30, 346–347, 377 windowControllerWillLoadNib method, 232 machine code for, 35 Windows pointers to, 21 in application hierarchy, 401 stack space for, 29 size of, 67–71, 409 Variables pane, 348 in Xcode projects vs. CodeWarrior, Version control, 183–185 313–314 cleaning up files in, 194–195 WithLinrg method, 121–122 for Linear, 191–193 Working directories, 392–393 repository for, 185–191 writeOldPlist method, 377 tagging in, 195–197 writeToFile method, 131 Version field writeToURL method, 258 for applications, 85 for frameworks, 173 X Versioned bundles x method, 226–227 defined, 438 .xcconfig file, 318 for frameworks, 132 .xcdatamodel files, 338 Versions, localized. See Localization Xcode and Xcode projects, 285 Vertical bars (|) in searches, 416 builds in, 331–339 Views configurations for, 342–344 in Cocoa applications, 61–62 rules for, 328–330 Interface Builder, 62–63 variables for, 327–328 layout, 63–67 xcodebuild tool for, 279–280, 339–340 split, 71 Class Browser window, 299 window sizing, 67–71 class modeler for, 299–301 custom. See Custom views vs. CodeWarrior in Interface Builder, 412 build behavior in, 312–313 in MVC, 48 converting CodeWarrior projects, property lists, 93–98 314–318 Virtual machine (VM), 139 debugging templates in, 308–309 key mapping in, 311–312 W Project Window in, 309–311 WARNING_CFLAGS variable, 427 RAD in, 309 Warnings. See Errors and warnings speed in, 307–308 Watch variables, 346–347 syntax coloring in, 308 Watchpoints window behavior in, 313–314 defined, 438 editor panes in, 285–290 Index 463

favorites bar in, 291–292 Y Groups & Files list in, 292–299 y method, 226–227 installing, 417–421 Project Find window, 290–291 Z project layout in ZERO_LINK variable, 341, 429 all-in-one, 303–305 ZeroLink, 347 condensed, 305–306 for AppleScript, 382 default, 302–303 for debugging information, 278 Run Script build phase, 330–331 defined, 439 settings hierarchy in, 340–342 for performance, 40–42, 366–367 Xcode Tools folder, 417 portability with, 277 xcodebuild tool, 279–280, 339–340 Zombies, 356–357 .xcodeproj file, 186, 340 in Cocoa, 359–360 XcodeTools.mpkg package, 417 in Core Foundation, 360–361 XML files released-pointer aliasing, 357–359 for Core Data, 233 for property lists, 101–103 for UTIs, 248