Online Book Reader

Home Category

Cocoa Programming for Mac OS X - Aaron Hillegass [146]

By Root 828 0
app, 468–469

for Mac developers, 3

receipt validation, 469–470

Mac OS X

Developer Tools, 3–4

macros

hardcoding behavioral settings with preprocessor, 462–464

using string table, 238–239

main function

changing, 51–52

creating command-line tool, 38–41

initializers with arguments, 56–58

overview of, 15

MainMenu.xib

menu item setup for adding panels, 197

Interface Builder, 15

man command, for ibtool, 240

managed object model, NSManagedObjectModel, 177–181, 189

manual reference counting

ARC working with, 82

autoreleasing objects, 73–76

dealloc method, 72–73

in iOS 5, 383

limitations of, 68

memory management, 67

overview of, 69–70

retain-count rules, 76–77

matrices, creating with cells, 253–254

mediated file access, and Powerbox, 468

memory management

accessor methods, 77–80

ARC, 80–82

within blocks, 375–376

iOS 5, 383

manual reference counting. See manual reference counting

overview of, 67–69

static analyzer troubleshooting, 63–64

thinking locally for, 77

menu items, target/action of, 95

messages

calling methods by sending objects, 6

handling, 65–66

sending to nil, 41–42

syntax for, 35–37

method name (selector)

adding colon when taking arguments to, 36–37

methods indexed by, 65–66

methods

adding to class, 21

adding to NSString, 307–309

calling by sending objects messages, 6

conventions for naming, 22

declaring in new class, 50

declaring private, 309

misspelling when implementing delegates, 112

NSAtrributedString, 289

NSDictionary, 209

NSFont, 285–286

NSMutableDictionary, 209

NSNotificationCenter, 222–224

NSOpenGLView, 441

NSPasteboard, 296–298

NSResponder, 274

NSString, 289

NSUserDefaults, 210–211

NSView, 241–243

as public in Objective-C, 27

retain-count rules for, 76–77

taking arguments, 36–37

modal windows, 336–337

model classes, 129

Model-View-Controller design pattern

Cocoa and, 129–130

document architecture relating to, 163

in object-oriented programming, 129

modifierFlags method, NSEvent, 274

mouse events

autoscrolling, 268–269

composite images, 264–265

nextResponder, 414–415

NSEvent, 257–258

NSResponder, 257

rollovers, 282–283

view’s coordinate system, 266–268

mouseDown: method

adding timer to autoscrolling, 328

coordinate system of views, 267

getting mouse events, 259

NSResponder, 257

mouseDragged: method

adding autoscrolling, 268–269

adding timer to autoscrolling, 328

coordinate system of views, 267

getting mouse events, 259

NSResponder, 257

mouseEntered event, rollovers, 283

mouseExited event, rollovers, 283

mouseMoved event, rollovers, 282–283

mouseUp: method

adding timer to autoscrolling, 328

coordinate system of views, 267

getting mouse events, 259

NSResponder, 257

multicore processors, and multithreading, 428

multithreading

time profiling, 431–435

faster performance and, 438–439

overview of, 427–428

race condition problem in, 428–429

simple Cocoa background threads, 429–431

using NSOperationQueue, 435–437

mutableCopy method, NSArray, 45

mutex locks, thread synchronization and, 438

N

naming conventions

delegates and notifications, 227

keys for names of defaults, 212

methods and instance variables, 22

navigation bar, 386–387

navigation controller, iOS

adding, 388–390

pushing view controllers, 393–395

New File menu item, creating classes, 20

new method, retain-count rules for ownership, 76

New Project, create new project, 12–14

nextKeyView, project with keyboard events, 276–278

nextResponder

and events, 414–415

pasteboards and nil-targeted actions, 300

NeXTSTEP, 1–3

NIB files

awakeFromNib called automatically, 30–31

chronology of applications, 32

localizing, 234–235

overview of, 17

NIB files and NSWindowController

adding panel to application, 194–196

menu item setup, 197

NSBundle, 204–205

overview of, 193

nil

ARC setting weak references to, 81–82

defined, 26

key-value coding

Return Main Page Previous Page Next Page

®Online Book Reader