Cocoa in a Nutshell: A Desktop Quick Reference (In a Nutshell (O'Reilly))

Cocoa in a Nutshell: A Desktop Quick Reference (In a Nutshell (O'Reilly))

Michael Beam, James Duncan Davidson

Language: English

Pages: 568

ISBN: 0596004621

Format: PDF / Kindle (mobi) / ePub


Cocoa® is more than just a collection of classes, and is certainly more than a simple framework. Cocoa is a complete API set, class library, framework, and development environment for building applications and tools to run on Mac OS® X. With over 240 classes, Cocoa is divided into two essential frameworks: Foundation and Application Kit. Above all else, Cocoa is a toolkit for creating Mac OS X application interfaces, and it provides access to all of the standard Aqua® interface components such as menus, toolbars, windows, buttons, to name a few.

Cocoa in a Nutshell begins with a complete overview of Cocoa's object classes. It provides developers who may be experienced with other application toolkits the grounding they'll need to start developing Cocoa applications. Common programming tasks are described, and many chapters focus on the larger patterns in the frameworks so developers can understand the larger relationships between the classes in Cocoa, which is essential to using the framework effectively.

Cocoa in a Nutshell is divided into two parts, with the first part providing a series of overview chapters that describe specific features of the Cocoa frameworks. Information you'll find in Part I includes:

  • An overview of the Objective-C language
  • Coverage of the Foundation and Application Kit frameworks
  • Overviews of Cocoa's drawing and text handling classes
  • Network services such as hosts, Rendezvous URL services, sockets, and file handling
  • Distributed notifications and distributed objects for interapplication communication
  • Extending Cocoa applications with other frameworks, including the AddressBook, DiscRecording, and Messaging frameworks

The second half of the book is a detailed quick reference to Cocoa's Foundation and Application Kit (AppKit) classes. A complement to Apple's documentation, Cocoa in a Nutshell is the only reference to the classes, functions, types, constants, protocols, and methods that make up Cocoa's Foundation and Application Kit frameworks, based on the Jaguar release (Mac OS X 10.2).

Peer-reviewed and approved by Apple's engineers to be part of the Apple Developer Connection (ADC) Series, Cocoa in a Nutshell is the book developers will want close at hand as they work. It's the desktop quick reference they can keep by their side to look something up quickly without leaving their work.

Cocoa in a Nutshell is the book developers will want close at hand as they work. It's the desktop quick reference they can keep by their side to look something up quickly without leaving their work.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@"Property 2"; property3 = @"Property 3"; } return self; } // These two methods return instance variable values - (id)property1 { return property1; } - (id)_property2 { return property2; } // This method returns a property value that is computed, // rather than stored in an instance variable -(NSArray *)allProperties { return [NSArray arrayWithObjects:property1, property2, property3, nil]; } @end Example 2-25 shows how to access each accessor using the key-value coding interface. Key-Value

@implementation Employee - (void)setFirstName:(NSString *)newName { [newName retain]; [firstName autorelease]; firstName = newName; } - (void)setLastName:(NSString *)newName { [newName retain]; [lastName autorelease]; lastName = newName; } - (void)encodeWithCoder:(NSCoder *)encoder { if ( [encoder allowsKeyedCoding] ) { [encoder encodeObject:firstName forKey:@"First"]; [encoder encodeObject:lastName forKey:@"Last"]; [encoder encodeInt: employeeNumber forKey:@"Number"]; } else { [encoder

Associates, Inc. All rights reserved. operation’s status. Services meant for publication do not invoke resolutionspecific delegate methods, and those services meant for resolution won’t ever invoke publication-specific delegate methods. Implementing these delegate methods is not necessary for a functioning instance of NSNetService. Net services can be published and resolved without having been assigned a delegate; however, without a delegate, there is no way of knowing a particular net service

into several optional categories, within which the methods are listed alphabetically. A class may have groups of convenience constructors, initializers, and property accessor methods, in addition to class and instance methods. Additionally, the synopsis lists methods a class expects its delegate to respond to, as well as notifications posted by instances of the class. Method groups are separated in the synopsis with C comments, such as // Initializers, // Class Methods, and // Notifications.

*NSRectArray; NSRectEdge typedef enum _NSRectEdge { NSMinXEdge = 0, NSMinYEdge = 1, NSMaxXEdge = 2, NSMaxYEdge = 3 } NSRectEdge; NSRectPointer typedef NSRect *NSRectPointer; NSRelativePosition typedef enum { NSRelativeAfter = 0, NSRelativeBefore } NSRelativePosition; 164 | Chapter 9: Foundation Types and Constants This is the Title of the Book, eMatter Edition Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved. Found. Types & Constants NSRoundingMode typedef enum {

Download sample

Download