Learning Cocoa with Objective-C

Second Edition September 2002
ISBN 978-0-596-00301-2
Seiten 382
EUR34.00, SFR57.90


Weitere Informationen zu diesem Buch

Inhaltsverzeichnis | Index | Probekapitel | Kolophon | Rezensionen |
Beispiele |


Index

	
[ A ], [ B ], [ C ], [ D ], [ E ], [ F ], [ G ], [ H ], [ I ], [ J ], [ K ], [ L ], [ M ], [ N ], [ O ], [ P ], [ Q ], [ R ], [ S ], [ T ], [ U ], [ V ], [ W ], [ Z ]

Symbols[ Top ]
%@ format token (print as object), 49
/* ... */ indicating comments, 64
= assignment operator, 51, 187
\ backslash, 32
: colon, 52
@"..." construct, 71
%d or %i (print as signed decimal), 49
= = equality operator, 187
// indicating comments, 64
- minus sign, 58
%o (print as unsigned octal), 49
+ plus sign, 58
%s (print as string), 49
%u (print as unsigned decimal), 49
%x (print as unsigned hexadecimal), 49

A[ Top ]
About Box, customizing, 316-318
acceptFirstResponder method (NSResponder class), 170
accessor methods, 58
action messages, 169
actions, 104
      connecting button to, 145
      Convert action defined for Controller class, 119
      defining, 145
      making connections and, 149
      target/action relationship, 143-150
ADC (Apple Developer Connection), 22
addObject method: (NSMutableArray class), 85
Address Book API, 87-89
Adobe Photoshop, designing icons with, 310
Adobe Portable Document Format (PDF), 7
alert dialog boxes, 183-185
alert sheets, 186-188
aligning objects, 116
allKeys method (NSDictionary class), 90
alloc message, coupled with an init message, 63
alloc method, 51, 63
alpha, 157
appendString: method (NSMutableString class), 78
Apple Computer
      Human Interface Guidelines, 17
      partnering with, 342
Apple Developer Connection (ADC), 22
Apple Help, 313, 315
AppleScript scripting language, 8, 9, 11
AppleScript Studio, 11
application bundles, 267
application ID (application identifier), 289, 295
Application Kit framework (AppKit), 9, 16-19
      document-based applications and, 222, 224
applications, 129
      About Box, customizing for, 316-318
      Credits.rtf file for, 317
      debugging, 73-76
      designing with MVC, 104-106
      document-based, 221-236
            building, 227-236
applications
      finishing touches for, 308-321
      Foundation framework and, 17
      help files for, 313-316
      icon for, 310-312
      main window for, setting size and location of, 39
      multilingual, 279
      packaging for distribution, 319
      as project type, 25
      running, 31-32
      saving data and, 210-214
      (see also sample applications)
Applications Settings pane, 233
Aqua interface widgets, problems aligning, 116
archiving, 15, 210-214
      GUIs, 40
arguments, 51
arrays, 82, 83-89
      illustrated with Address Book API, 87-89
      replacing with sets, 89
assignment operator (=), 51
      vs. equality operator (= =), 187
attachments contained in RTF files, 239
attributes
      changing for text fields, 112
      setting for window, 109
      string, 160, 244
autoindentation, in Project Builder, 67
autorelease method (NSObject class), 96
autosizing views, 155
auxiliary windows, 297-307
awakeFromNib method (NSNibAwaking protocol), 142
      implementing for Dot View, 175

B[ Top ]
background threads, image loading performance and, 278
backslash (\) in folder names, 32
BOOL type, 54
bounds of a custom view, 151
breakpoints, setting, 33, 73
BSD Unix environment, 4
Build & Debug button (debugger), 34
Build & Run button (Project Builder), 31
Build button (Project Builder), 29, 30
build problems, resolving, 30
"Build succeeded", 29
bundle directories, 269
bundles, 267-278
      .icns file in, 310
      localized resources and, 280-284
      as project type, 25
buttons
      adding to interfaces, 113
      connecting to an action, 145

C[ Top ]
C++ programming language, 10
C++ Tools, 26
calibrated HSB, 157
calibrated RGB, 157
call command, 76
calling
      methods, 51
      superclass methods, 62
Carbon environment, 3
      Apple Help and, 313
categories, 69, 194
cats and codenames, xi
cells, 134-136
CG calls, 157
changes, tracking with notifications, 306
character attributes, 160, 244
Cheetah release of Mac OS X, xi
class methods, 46, 51
Class type, 54
classes, 44
      creating, 54-60
      defining, 57
            for Currency Converter, 118-119
            for Dot View, 173-181
      implementing, 58
            for Currency Converter, 122-124
            for Dot View, 174-181
      protocols and, 193
      root class and, 47
      support, 16
      using, 59
Classes group, 37
Classic environment, 4
CMYK, 157
Cocoa, 3-19
      colors and, 157
      documentation/resources for further reading, 338-342
      frameworks of, 9, 11-19
      text system of, 237-239
      web sites about, 340
Cocoa Browser documentation viewer, 345
CocoaTopics.html file, 325, 343
codenames and cats, xi
coding, 210-214
collection classes, 82-94
      storing collections as files, 92-94
collections, 13
colon ( : ), in method names/message arguments, 52
colors, 18, 157
ColorSync, 7, 259
Column Title field, vs. Identifier field, 202
command-line development tools (list), 41
comments in code, 64
compiler settings, configuring, 318-319
component technologies, 8
compressed disk images,
      distributing applications and, 319
Concurrent Version System (CVS), 23
connections, 149
Console tab (debugger), 34
Console (the), 33
containsObject method: (NSArray class), 83
content view, 130
Contents directory, bundles and, 268-270
Contents/Info.plist, 222
Control palette window (Interface Builder), 39
Controller class, creating for Currency Converter, 118
controller instance, for formatted cell example, 138
Controller instance object, connecting to interface, 120
controllers, 105
      for formatted cell example, creating, 138
controls, 17, 134-135
      connecting to Dot View, 172
Convert action defined for Controller class, 119
Convert button, for Controller instance object, 121
Converter class
      adding a method to, 123
      creating for Currency Converter, 119
Converter instance object, connecting to Controller instance object, 121
coordinate systems, 132-134
copyright information, 106
Core Graphics (CG) calls, 157
core program framework, 126
      accessing objects and, 131
CoreFoundation Tools, 26
CoreServices Tools, 26
count method (NSArray class), 83
count method (NSDictionary class), 90
Cox, Brad, 10
creating
      classes, 54-60
      custom views, 151-156
      data source for table views, 203-206
      delegates, 183-185
      GUIs, 107-118
            for table views example, 200
      Inspector panel, 300-303
      objects, 48-51, 62-67
      projects in Project Builder, 25-29
      sample applications
            Currency Converter, 105-125
            for displaying date and time, 136-144
            Document Print, 262-265
            Dot View, 170-181
            Favorites, 290-293
            Hello, World, 23-32, 36-40
            Image Bundle, 270-274
            Menu, 200-218
            RTF Edit, 239-242
            Simple Date, 136-144
            Simple Inspector, 298-300
            Simple Text Edit, 227-236
            View Print, 260
Credits.rtf file, 317
cString method (NSString class), 72
"Currency Converter" application, 106
      assembling component parts of, 119-121
      testing, 125
custom views, 151-165
      adding to main window, 153
      autosizing, 155
      paths, drawing into, 161-164
      preparing to draw into, 156
      strings, drawing into, 158-161
CVS (Concurrent Version System), 23

D[ Top ]
data functionality, 193-218
data source class, declaring for table views, 202
data source, creating for table views, 203-206
data types for text, 238
data values, 13
dataRepresentationOfType method: (NSDocument class), 224
date and time, 13, 31, 32
      sample application displaying, 136-144
dealloc method
      implementing for Dot View, 176
      invoking for objects, 96
deallocating objects, 67-69
debugger, 33
debugger commands (list), 76
debugging applications, 73-76
decorative lines, 115
defaults, 289-295
defaults command, 293
delegates/delegation, 182-188
deleteCharactersInRange: method (NSMutableString class), 78
designated initializers, 64-67
developer language-specific resource, 283
developer region-specific resource, 283
Developer Tools
      installing, 20-22
      updating via ADC web site, 22
Developer.mpkg file, 21
development tools, 20-42
      GUI/command-line (lists), 41
      as project type, 26
device RGB, 157
dictionaries, 82, 89-92
directory wrappers, 239
disclosure triangle, 28
Disk Copy utility, 320
disk images, xiv
      distributing applications and, 319
display method (NSView class), 158
distributed objects, 8, 15
.dmg files, xiv
Dock (the), adding applications to, 23
document architecture, 18, 221-236
document-based applications, 18, 221-236
      building, 227-236
      printing from, 262-265
      template for, 227
document controller, 225-226
document objects, 223
"Document Print" application, 262-265
document type arrays, 223
documentation, 338, 343-346
      accessing via Project Builder, 42
      print-on-demand, 340
Documentation group, 27
documents, 222
      document controller for, 225
      implementation for, 230
      speaking contents of, 253-255
"Dot View" application, 170-181
      About Box, customizing for, 316-318
      connecting controls to, 172
      creating component parts of, 170-172
      finishing touches for, 308
      help files, adding to, 313-316
DotView class
      creating, 170
      defining, 173-181
DotView.h header file, defining, 173
DotViewIcon.psd file, 310
drag-and-drop, 19
drawRect: method (NSView class), 151
      implementing, 153
            for Dot View, 176
      printing and, 259
dynamic typing, 141

E[ Top ]
embedded images, 251-253
Empty interface window (Interface Builder), 39
encodeWithCoder: method (NSCoding protocol), 210
entries (in dictionaries), 89
equality operator (= =), vs. assignment operator (=), 187
error messages, 30
event cycle, 167
event messages, 169
events, 166-192
      routing, 170
      types of, 167
examples (see sample applications; sample code)
exceptions, 13
exercises in this book, answers to and tips for, 325-337
External frameworks and libraries group, 27

F[ Top ]
"Favorites" application, 290-293
file management, 15
file wrappers, 239
files
      storing as collections, 92-94
      working with, 79-82
File's Owner object, 297
filesystem paths, 79-82
filesystems
      accessing, 19
      functionality of, Foundation framework and, 15
fileWrapperRepresentationOfType: method (NSDocument class), 239
first responder, 169
focus, 157
folders, naming, 32
Font menu, 243
fonts, 7, 18
      functionality for, 243
      setting string attributes for, 160
formal protocols, 194
format string tokens, 49
formatters, 136
      formatted cell example illustrating, 136-144
      using, 215
formatting
      functionality of, Foundation framework and, 16
      paragraphs, 250
      removing/undo function for, 249
Foundation framework, 9, 11-16, 71-98
Foundation Tools, creating, 26, 71-98
framework bundles, 267
frameworks, 9
      core program, 126
      as project type, 25
frameworks bundle directory, 269
Frameworks group, 38
"freeze-drying" GUIs, 40

G[ Top ]
global resources, 283
Gosling, James, 10
grayscale, 157
Groups & Files list (Project Builder), 38
groups, projects and, 27
GUIs (graphical user interfaces), 101-125
      adding buttons to, 113
      applications with vs. without, 26
      archiving, 40
      concepts in for Cocoa, 101-104
      creating, 107-118
            with Interface Builder, 35-40
      development tools for (list), 41
      finishing touches for, 308
      "freeze-drying", 40
      vs. interfaces, 55
      table views example and, 200
      testing, 117
      (see also user interface)

H[ Top ]
header (.h) file, 37, 54
      for Currency Converter, 123
      for Dot View, 173
"Hello, World" example, 23-32
      code for, 28
      GUI for, 36-40
help command, 76
help files, 313-316
HIG (Human Interface Guidelines), 17
Horn, Max, 345
HSB, 157
HTML format, help files and, 313
Human Interface Guidelines (HIG), 17

I[ Top ]
.icns file, 310
IconComposer utility, 310
icons for applications, 310-312
id keyword, dynamically typed outlet declarations and, 141
id type, 54
identifier attributes, 199
Identifier field, vs. Column Title field, 202
"Image Bundle" application, 270-274
images, 18
      application icons and, 310
      embedded, 251-253
      preloading, 276-278
imaging, 7
immutability vs. mutability, 80
immutable collection classes, 82
immutable strings, 78-80
IMP type, 54
implementation, 58
implementation (.m) files, 37, 54
      for Currency Converter, 124
      for Dot View, 173
info panels, 297-307
info property list, 222
      modifying, 233
Info window, 298-307
      implementing code for, 303-306
Info.plist file, 268
informal protocols, 194
inheritance, 46
      caution with, 48
init message, coupled with alloc message, 63
init method, 51
      invoking for arrays, 95
initial first responder, setting, 115
initialFirstResponder method (NSWindow class), 169
initializers, 64-67
initWithCoder: method (NSCoding protocol), 210
initWithContentsOfFile: method (NSString class), 92
initWithFrame: method (NSView class), 151
      implementing, 174
input/output (see entries at I/O)
insertObject:atIndex: method (NSMutableArray class), 85
insertString:atIndex: method (NSMutableString class), 78
Inspector panel, creating, 300-303
inspector, sample application for, 298-300
instance, creating for Controller and Model classes, 119
instance methods, 51
integration of graphical elements, Foundation framework and, 17
interface, 45
      vs. graphical user interface, 55
      sample definition of, 57
Interface Builder, 35-40
      adding to the Dock, 23
      application main window, setting size and location of, 39
      File's Owner object and, 297
      parts of, 38
internationalization (see localization)
introspection, 70
I/O management, Foundation framework and, 15
IOKit drivers, 26
isa variable, 53
isOpaque method (NSView), implementing for Dot View, 177

J[ Top ]
Jaguar release of Mac OS X, xi
Java environment, 4
Java programming language, 9, 10
java.lang.StringBuffer, NSMutableString class analogous to, 78

K[ Top ]
kernel extensions, as project type, 26
key-value coding, 195-199
key-value pairs, 89
key window, 129
      panels and, 130
keyboard events, 167
keys, 195
keystrokes, 166
      (see also events)
key-value pairs, 289

L[ Top ]
labels, 52
language conventions, 281
language preferences in Mac OS X, 279
lastPathComponent method (NSString class), 80, 82
Layout menu, 116
layout rectangles, displaying, 116
length method (NSString class), 72
lines, adding for decoration, 115
link wrappers, 239
loadDataRepresentation:of Type: method (NSDocument class), 224
loadFileWrapperRepresentation:ofType: method (NSDocument class), 239
localization, 7, 279-288
      architecture for, 279
      functionality of, Foundation framework and, 16
localizedStringForKey:value:table: method (NSBundle class), 287
lockFocus method (NSView class), 157
locks, 14
loops, 14, 167
.lproj directory extension, 280

M[ Top ]
.m files (Objective-C source code), 37, 54
      for Dot View, 173
      for Currency Converter, 124
Mac OS X
      development documentation for, 343-346
      key environments of, 3-5
      language preferences for, 279
      Release 10.2 (Jaguar), xi
      Software Update tool, Developer Tools and, 22
MacOS bundle directory, 269
mailing lists, 341
main nib file, 38
      formatted cell example and, 136
      opening in Interface Builder, 108
main window, 129
      adding custom views to, 153
      panels and, 130
main.m file, 28, 37, 57
manpages, 27
margins, setting, 265
memory leaks, 67
memory management, 15, 94-98
      multiple documents and, 226
      notifications and, 191
      rules for, 97
"Menu" application, 200-218
      coding/archiving, adding to, 210-214
      formatter, adding to, 215
      table-data sorting capability, adding to, 215-218
Menu bar (Interface Builder), 39
menu items
      document controller and, 225
      finishing touches for, 308
message arguments, 51
message expressions, 51
message log, 32
messages, 51-54, 169
      nested, 52
      parts of, 51
method name, 51
methods, 44, 51
      calling, 51
      overriding, 61-69
minus sign (-) in method definitions, 58
model class (see Converter model class)
models, 104, 193-218
      adding entries to, 206-210
Model-View-Controller (see MVC)
mouse clicks, 166
      (see also events)
mouseDown: method, implementing for Dot View, 177
mouse events, 167
MP3 players, 46
      songs illustrating classes, 54-60
multilingual applications, 279
multiple-document architecture, 221-236
multiple-inheritance, 47
mutability vs. immutability, 80
mutable arrays, 85-86
mutable collection classes, 82
mutable dictionaries, 91
mutable strings, 78-80
MVC (Model-View-Controller)
      designing applications with, 104-106
      text system and, 237
"MyDocument" class, 227
      implementing, 233-236

N[ Top ]
nested messages, 52
New Project Assistant (Project Builder), 25
NeXT Interface Builder, 36
nextKeyView outlet, 117
NeXTSTEP, 5
Nib file window (Interface Builder), 39
nib files, 36, 102
      localizing, 284-286
      main, 38
nil/Nil type, 54
notification center, 189-191
notifications, 14, 188-191
      tracking changes with, 306
NS prefix, 29
NSApp object, 167
      event handling and, 170
NSApplication class, 126, 129
      event cycle and, 167
NSApplicationMain function, 142
NSArchive class, 210
NSArray class, 83
NSBeginAlertSheet function, 186
NSBundle class, 270
      resources-handling methods and, 283
NSCoder class, 210
NSCoding protocol, serialization and, 210
NSColor class, 157
NSDictionary class, 89
NSDocument class, 222
      file wrappers and, 239
      skeletal implementation of, 230
      window controllers and, 226
NSDocumentController class, 222, 225
NSEvent class, 166
NSFontManager class, 243
NSFontPanel class, 243
NSKeyValueCoding protocol, 195-199
NSLayoutManager class, 238
NSLog function, 29, 31
NSMutableArray class, 85, 86
NSMutableDictionary class, 91
NSMutableSet class, 89
NSMutableString class, 78
NSNotificationCenter class, 189
NSNumber class, 195
NSObject class, 126
NSPrintInfo helper object, 261
NSPrintOperation class, 261
NSResponder class, 126, 128, 168
NSSet class, 89
NSString class, 72
NSTextContainer class, 238
NSTextStorage class, 238, 244
NSTextView class, 237
NSUndoManager class, 249
NSUserDefaults class, 290
NSView class, 126, 128
      custom views and, 151
      defining subclass of, 152
NSWindow class, 126, 128
      event handling and, 170
      notifications and, 189
NSWindowController class, 222, 226
numbers, comparing, 92

O[ Top ]
object composition, 48
objectAtIndex: method (NSArray class), 83
objectForKey: method (NSDictionary class), 90
Objective-C programming language, 9, 43-70
      categories and, 194
      defined types of (list), 54
      protocols and, 193
Objective-C++ programming language, 10
object-oriented programming (OOP) with Objective-C, 43-70
objects, 43-51
      aligning, 116
      allocating, 50
      arrays and, 95
      classes of, 44
      creating, 48-51, 62-67
      deallocating, 67-69, 95
      duplicating, 111
      functionality of, Foundation framework and, 15
      initializing, 50, 95
      sending to another application, 210
      working with multiple, 50
onscreen/offscreen windows, 129
opacity, 157
OpenStep, 5
operating systems, Foundation framework and, 13
optimization level box, 319
-Os setting, 319
Other Sources group, 37
outlets, 103
      for Controller class, defining, 118
      delegate, 182
      for formatted cell example, creating, 138
      making connections and, 149
      typing, 141
oval paths, 164
overriding methods, 61-69

P[ Top ]
packaging applications for distribution, 319
panels, 17, 130
paragraphs, formatting, 250
pasteboards, 18
pathExtension method (NSString class), 80, 82
paths
      drawing into views, 161-164
      oval, 164
PDF (Portable Document Format), 7
performance
      improving image load time, 276-278
      multiple nib files for, 297
periodic events, 167
Photoshop, designing icons with, 310
PID (process ID number), 31, 32
PkgInfo file, 268, 269
plist files (property lists), 92
plug-in bundles, 267
plus (+) sign in method definitions, 58
polymorphism, 61
Portable Document Format (PDF), 7
ports, 14
preferences, 289-295
      accessing from the command line, 293
      functionality of, Foundation framework and, 16
      language, in Mac OS X, 279
      overriding, 294
Preferences folder, caution when editing files in, 290
preloading images, 276-278
Preview application, 263
primitive types, 195
print command, 75, 76
print info objects, 261
print: message, 259
print-object command, 74, 76
printf (C programming language), 29
printf manpage, accessing, 49
printing, 7, 18, 259-266
      print operations for, 261-265
      tokens for, 49
printShowingPrintPanel: method (NSDocument class), 262
process ID number (PID), 31, 32
Products group, 27, 38
programming, Foundation framework and, 12
Project Builder, 22-29
      accessing documentation via, 42
      autoindentation for, 67
      viewing application icons and, 311
projects
      creating/building, 25-29
      naming, 26
properties, 58
      application-wide, setting, 233
property lists (plist files), 92
protocols, 46, 70, 193-194
      types of, 194
Puma release of Mac OS X, xi
Pure Java, as project type, 25

Q[ Top ]
Quartz environment, 7, 126
      Core Graphics calls and, 157

R[ Top ]
rangeOfString: method (NSString class), 76
receivers, 51
reference counting, 95
Refresh button, adding, 145
release messages, 95
Release Notes for Project Builder, accessing, 24
removeObject: method (NSMutableArray class), 85
removeObjectAtIndex: method (NSMutableArray class), 85
removeObjectForKey: method (NSMutableDictionary class), 92
resources, 267-277
      localized, 280-284
resources bundle directory, 269
resources for further reading
      Apple documentation for developers, xiv
      Apple Help, 315
      AppleScript Studio, 11
      C programming language, xiii
      Carbon environment, 4
      categories, 194
      Cocoa, xii, 338-342
      distributed objects, 15
      Human interface Guidelines, 17
      icon design, 312
      manpages, 27
      Objective-C, 10, 54
      Objective-C++, 10
Resources group, 37
responder chain, 169
responders, 168-170
      first responder, 169
retain messages, 97
RGB, 157
rich text, 237-255
      data types for, 238
"rich-text editor" application, 237, 239-242
root class, 47
routing events, 170
"RTF Edit" application, 239-242
RTF files, Project Builder and, 318
RTF format, 238
RTFD format, 239, 251
run loops, 14, 167
runtime, 45

S[ Top ]
sample applications
      Currency Converter, 105-125
      for displaying date and time, 136-144
      Document Print, 262-265
      Dot View, 170-181
      Favorites, 290-293
      finishing touches for, 308
      Hello, World, 23-32
            code for, 28
            GUI for, 36-40
      Image Bundle, 270-274
      Menu, 200-218
      RTF Edit, 239-242
      Simple Date, 136-144
      Simple Inspector, 298-300
      Simple Text Edit, 227-236
      View Print, 260
      (see also Foundation Tools, creating)
sample code, xv
      awakeFromNib method, 142
      custom views, setting up (finalizing), 175
      dealloc method, 67, 176
      description method, 61
      designated initializer method, 175
sample code
      designated initializers, 64-66
      dictionaries, 90
      dot, changing size of, 179
      DotView.h header file, 173
      drawRect: method, 154
      files, reading into strings, 81
      header file, for Currency Converter, 123
      "Hello, World" example, 28, 36-40
      implementation file
            for Currency Converter, 124
            for Dot View, 179
      interface, drawing, 176
      key-value coding, 195-198
      mouse-down events, 178
      mutable arrays, 85
      MyDelegate.m file, 184
            modified to use sheets, 186
      notification center, removing object from, 191
      notification handler, adding to Dot View, 190
      objects, 48-50
      opaque view, 177
      oval paths, drawing, 164
      paths, drawing into custom views, 162
      property lists, 92
      refresh: method, 149
      skeletal implementations, 230
      skeleton code for Dot View, 174
      song class, 60
      song implementation, 58
      song interface, 57
      statically typed outlet, 142
      string attributes, setting, 160
      strings
            drawing into custom views, 159
            working with, 72
      substrings, 77
      text view outlet, adding to NSDocument subclass, 232
screen coordinate system, 132
SEL type, 54
self variable, 62, 63-65
serialization, 210
serializers, 15
serializing GUIs, 40
Services submenu, 8
set command, 76
set method (NSColor class), 157
setColor: action method, implementing for Dot View, 178
setDelegate: method, 182
setObject:forKey: method (NSMutableDictionary class), 91
setRadius: action method, implementing for Dot View, 179-181
sets, 82, 89
setWidth:height: method, 52
shared framework bundle directory, 270
shared support bundle directory, 270
sheetClosed: method, 186
sheets, 185-188
"Simple Date" application, 136-144
"Simple Inspector" application, 298-300
"Simple Text Edit" application, 227-236
skeletal implementation, 230
Software Update tool, Developer Tools and, 22
songs, illustrating classes, 54-60
sorting table data, 215-218
source code for application's entry point, displaying via disclosure triangle, 28
Source group, 27
spaces, in folder names, 32
spell-checking, 19
Standard Apple plug-ins, as project type, 26
Standard Tools, 26
static typing, 141
Step over Function button (debugger), 34
string attributes, 160, 244
      (see also text attributes)
string data type, 238
string tokens, 49
stringByAppendingString: method (NSString class), 72, 74
stringByStandardizingPath method (NSString class), 80
strings, 12, 71-82
      drawing into views, 158-161
      localizing, 287
      mutable/immutable, 78-80
      portions of, working with, 76-78
stringWithContentsOfFile: method (NSString class), 80
stroke method, 164
subclasses, 46
substrings, 77
substringFromIndex: method (NSString class), 76
substringToIndex: method (NSString class), 76
substringWithRange: method (NSString class), 77
superclasses, 46
      methods for, calling, 62
support classes, 16

T[ Top ]
Tab key, 117
tabbing between text fields, 115
table columns, configuring, 201
table entries, allowing modification of, 206
table views, 199-210
tables, sorting data in, 215-218
Takanori, Hoshi, 345
takeValueForKey: method (NSKeyValueCoding protocol), 195
target/action relationship, 143-150
tasks, 14
Terminal (the), 33
      accessing preferences and, 293
Terminal window, 31
text, 7, 18
      data types of, 238
      rich, 237-255
      storing, 244-249
text attributes, 244-249
      (see also string attributes)
"text editor" application, 227-236
text fields, 110-112
      adding to formatted cell example, 137
      changing attributes of, 112
      first, 115
text labels, adding to text fields, 112
Text menu, 250
text views, 231-235, 238-251
      inspector for viewing contents of, 298-307
thread stack viewer (debugger), 34
threads, 14
      image loading performance and, 278
time (see date and time)
timers, 14
timestamp, 31, 32
titles
      of columns, 201
      setting for windows, 109
tokens (string format), 49
tools (see development tools)
tracking-rectangle events, 167
transparency, 157
troubleshooting, 30

U[ Top ]
undo manager, 249
undo/redo, Foundation framework and, 16
unlockFocus method (NSView class), 157
URL handling, 16
URLs
      Apple Developer Connection (ADC), 340
      Apple documentation for developers, xiv
      Apple software development kits, 340
      Cocoa Browser, 346
      country abbreviations, 283
      language abbreviations, 282
      Mac DevCenter, 340
      sample code for this book, xv
      web sites about Cocoa, 340
user events (see events)
user interface
      Apple Computer guidelines for, 17
      for formatted cell example, creating, 136
      functionality of, Foundation framework and, 17
      (see also GUIs)
user language-specific resources, 283
user preferences (see preferences)
user region-specific resource, 283
UTF8String method (NSString class), 72, 75
utilities
      Disk Copy, 320
      Software Update, 22

V[ Top ]
valueForKey: method (NSKeyValueCoding protocol), 195
variable viewer (debugger), 34
Vervante, 340
view coordinate system, 133
"View Print" application, 260
views, 17, 105, 128
      content, 130
      custom, 151-165
      hierarchy of, 130
      printing, 259-261
voice functionality, 253-255

W[ Top ]
web sites (see URLs)
whatis command, 76
widgets, 17
width of table columns, adjusting, 201
window controllers, 226
window coordinate system, 133
Window Environment configuration option (Project Builder), 24
Window menu, 129
window objects, 102
window server, 126
windowControllerDidLoadNib: method (NSDocument class), 224
windowNibName method (NSDocument class), 224
windows, 17, 102, 126-130
      auxiliary, 297-307
      key/main, 129
      onscreen/offscreen, 129
      resizing, 108
      window controllers for, 226
windowShouldClose: method, 184, 186
writeToFile: method (NSString class), 80, 92

Z[ Top ]
zero-based indexing, 13

	

Zurück zu Learning Cocoa with Objective-C


Themen

Buchreihen

Special Interest

International Sites

O'Reilly China O'Reilly France O'Reilly USA O'Reilly Japan O'Reilly Taiwan