In the first installment of this series on Cocoa programming for scientists, you got your first glimpse of Objective-C code. Hopefully you are now sufficiently recovered from the shock of that encounter to start digging deeper. In this part, we’ll take a closer look at the object oriented building blocks of Objective-C: classes and objects.
Cocoa is a development API native to the Mac OS X operating system. Cocoa Touch is the closely-related analogous platform for the iOS. It is written in Objective-C, and acts as a sort of 'top layer' to each operating system. CocoaModem is a Mac OS X application which implements modems (modulator-demodulators) for some of the Amateur Radio modulation modes. CocoaModem’s name is a reference to the MacOS X Cocoa framework that it uses.
Object-Oriented Programming and Dead Horses
Many scientists have a natural aversion to the object oriented (OO) style of programming. Some argue that it results in ‘slow’ code, others that it hides the subtleties of an algorithm in little black boxes where you can’t look. While these sorts of arguments are rooted to some degree in fact, they are generally exaggerated, or miss the point entirely. In fact, object oriented programming (OOP) has been a raging success outside scientific circles, and with good reason. Heck, even Fortran now supports it! So it’s time to stop flogging a long since deceased horse, and try to come to terms with the new paradigm. I’m here to help, and who knows, you may even like it.
Classes vs Types
OOP may seem like a completely different animal when you first encounter it, but after a while, you realize it actually still has four legs, a head, and a tail. It is actually a natural evolution of the procedural programming model most scientists are already familiar with.
Take the class, for example. Classes are the basic building blocks of an OO program, but they are really just like structs on steroids. In C, a struct defines a data type that contains variables. For example, you might find the following in a molecular simulation package:
Atom
is a type containing the variables mass
and position
. Together, these variables constitute an Atom
.In Objective-C,
Atom
could be a class.As you can see, this is not dissimilar. The syntax now includes the
@interface
and @end
tokens, and a different class (NSObject
) also makes an appearance, but otherwise things are pretty much the same.So where are the steroids referred to earlier? Well, the first is hidden in the rather innocent looking
NSObject
reference. This is the super class of Atom
. Atom
gets to reuse all the stuff defined in the NSObject
class for free — Atom
inherits everything in NSObject
. We’ll discuss this in more detail later in the series when we cover Inheritance and Polymorphism.The second enhancement is actually not very clear from this example, but it has to do with the space between the closing curly brace and the
@end
keyword. In this space you can declare methods, which are basically functions that belong to the class. If the variables in a class define its state, the methods define its behavior.So a class is really a high-level type — a type with state and behavior. Not only that, but one class can inherit from another, getting lots of its variables and methods for free. Hopefully, as this course progresses, you will begin to appreciate how useful these seemingly innocuous attributes of classes really are.
Class Interface
To make this discussion of classes more concrete, we are going to write a simple one that adds numbers together. The class will be called
AdditionOperator
, and its sole purpose will be to sum two decimal numbers.To begin with, we define the interface block of the class, which declares its variables and methods.
The interface of a class gets declared in a header file, in the great tradition of C-based languages. In this case, the code above would be entered into a file called ‘AdditionOperator.h’.
The code itself begins by importing the Foundation framework, which we met for the first time last week. Foundation contains most of the Cocoa classes that are not directly related to the user interface. It contains classes for strings, for example, and containers like arrays and dictionaries. The
NSObject
class is also contained in Foundation, and that is why it is needed here. In practice, you always need to include either the Foundation framework, or the all-encompassing Cocoa framework.To use a framework, you use the
#import
preprocessor directive. This is an Objective-C extension to the C language preprocessor. In C, you use the #include
directive to import a file, but this does not prevent a conflict from arising if a piece of code ends up being included twice. The #import
directive does prevent this, by first checking if the code in question has already been included, and, if so, skipping over it.Note that when you use the
#import
directive with a framework, you use triangular brackets, and enter the included file after the name of the framework itself. This is because Mac OS X uses a two-level namespace. The idea is to avoid naming conflicts: Imagine that you had another framework that also included a header file called ‘Foundation.h’. This would conflict with the ‘Foundation.h’ file in the Foundation framework, and the preprocessor wouldn’t know which file to import. To resolve this, the name of the framework is given in the import directive.Now we get to the class interface itself.
AdditionOperator
is a subclass of NSObject
; it inherits every variable and method contained in NSObject
. Just about all Cocoa classes ultimately inherit from NSObject
, as we’ll discuss in detail later. NSObject
includes various methods, including some for initialization and deletion of objects, and others for memory management. We’ll meet these in due course.The variables in a class are known as instance variables, or ivars for short. This is because they belong to an object, or instance, of the class in question. In the case of
AdditionOperator
, there are two: leftValue
and rightValue
. These are designed to store the left and right values in an addition expression like ‘5 + 2’. In this example, leftValue
would be 5
, and rightValue
would be 2
.AdditionOperator
defines two new methods: initWithLeftValue:andRightValue:
and evaluate
. (I say ‘new methods’ because the class also includes all of the methods defined in NSObject
.) The first of these methods is an initializer, which sets up a new object in a valid state when it is first created. An initializer is always called when creating a new object in Objective-C. The second method is invoked to calculate the value of the operator, that is, to add the left and right value together.The syntax of the method declarations may have you a bit perplexed. Let’s consider the initializer in order to clarify things:
It begins with a hyphen. This indicates that the method is an instance method, and belongs to an object (instance) of the class, rather than to the class itself. This may not make sense now, but it should become clear later. If you want to write a method that belongs to the class, ie that is shared by all objects of that class, you use a ‘+’ symbol instead of a hyphen.
The naming of the method uses the segmented style that was first introduced in the first tutorial. Hopefully you are somewhat used to it by now. The difference here is that the type of each argument is included in parentheses after the colons. This indicates that the arguments
lv
and rv
should be of the type double
, a double precision number.You’ll also notice that the type
id
is given in parentheses just after the hyphen. This is the return type of the method. If there is no return value, you enter void
here, similar to plain C. The type id
is special in Objective-C; it is used to mean an object of any class.Class Implementation
The header file defines the public interface of a class, it’s variables and methods. The implementation of the methods is found in a second file, with the extension ‘m’. For
AdditionOperator
, the following implementation appears in the file ‘AdditionOperator.m’.This file begins with another import, that of the class header. This is needed so that the compiler knows about the class interface as it processes the implementation. Note that when importing one of your own headers, you use quotation marks, rather than the triangular brackets used for framework header files.
Analogous to the
@interface
block, the implementation of a class is contained between @implementation
and @end
tokens. Each of the methods declared in the header file — and often many that aren’t — are defined in the implementation block. (An example of when a method can appear in the implementation block and not in the interface block is when it gets declared in the superclass. This is known as overriding a method, and will be discussed later in the series.)The method implementations can make reference to the arguments they are passed, of course, but also to the class instance variables. For example, in the initializer method, the instance variables
leftValue
and rightValue
are assigned the same values as the arguments lv
and rv
, respectively. The instance variables belong to the object that is being initialized; the object can be referred to in any instance method using the special variable self
. (For those familiar with C++ or Java, self
is equivalent to the this
pointer.) In setting the instance variables, it would be just as valid to writebecause
leftValue
and rightValue
are actually contained in the object self
, but as long as there is no ambiguity in the variable names, you do not need to explicitly do this.Aside from the special
self
variable, which is magically passed to any instance method for you, there is also super
. super
is a bit like self
— it is a pointer to the object that owns the method — but there is one major difference: super
is used to access variables and methods in the superclass.In the initializer above, the method
init
is invoked for super
. This means that the init
method in NSObject
will be invoked. Even if there was an implementation of init
in the AdditionOperator
class — which there isn’t — it would not be invoked, because when you use super
you are saying that you want to look in the superclass, not the immediate class.Testing It Out
To test this simple class, generate the
AdditionOperator
files (ie ‘AdditionOperator.h’ and ‘AdditionOperator.m’), and then create a file called ‘main.m’ with the following contents:This creates an
AdditionOperator
object with left value 4.0, and right value 5.0, and prints out the result of evaluating the operator. Don’t concern yourself too much with things you don’t understand in the main function, because they will be dealt with in the coming weeks.To compile and run this, issue the following commands:
The output should look like similar to this:
Stay Tuned
Today you got your first glimpse of the internals of a class. Next time we will look in more detail at how classes work, from initializing objects to inheritance. In the meantime, try to get your head around some of the concepts introduced today. OO is a foreign concept for most scientists, but if you stick at it, it won’t be long before it all fits together. In the beginning it seems to just be made up of lots of jargon and seemingly abstract concepts, but there is a reason to the madness, and it won’t be long before it starts falling into place, and ‘invoking the designated initializer of a superclass’ will become second nature.
Home > Store
Share|
Register your product to gain access to bonus material or receive a coupon.
- By Bill Cheeseman
- Published Mar 23, 2010 by Peachpit Press.
![Cocoa api Cocoa api](https://vignette.wikia.nocookie.net/marvel_dc/images/4/44/Cartoon_Network_Block_Party_Vol_1_50.jpg/revision/latest?cb=20110731025623)
eBook (Watermarked)
- Your Price: $31.99
- List Price: $39.99
- Includes EPUB, MOBI, and PDF
This eBook includes the following formats, accessible from your Account page after purchase:
EPUBThe open industry format known for its reflowable content and usability on supported mobile devices.
MOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDFThe popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Description
- Copyright 2010
- Edition: 2nd
- eBook (Watermarked)
- ISBN-10: 0-321-77005-6
- ISBN-13: 978-0-321-77005-9
Completely revised edition, now covering Snow Leopard!
Springing from the original Vermont Recipes Web site, where many of today’s Cocoa developers got their start, Cocoa Recipes for Mac OS X, Second Edition is a programming cookbook that shows you how to create a complete Mac OS X application. In this updated edition, author Bill Cheeseman employs a practical, step-by-step method for building a program from start to finish using the Cocoa frameworks. He begins by creating the project using Xcode and designing and building the user interface with Interface Builder, and then he fills in the details expected of any working application, such as managing documents and windows, setting up the main menu, and configuring controls. Later recipes show you how to add important features such as a preferences window, printing, a Help book, and AppleScript support. The book concludes with a discussion of deployment of your finished product and steps you can take to explore additional features. Equipped with the expertise and real-world techniques in this book, programmers with some knowledge of C and Objective-C can quickly master the craft of writing Cocoa programs for Mac OS X.
Springing from the original Vermont Recipes Web site, where many of today’s Cocoa developers got their start, Cocoa Recipes for Mac OS X, Second Edition is a programming cookbook that shows you how to create a complete Mac OS X application. In this updated edition, author Bill Cheeseman employs a practical, step-by-step method for building a program from start to finish using the Cocoa frameworks. He begins by creating the project using Xcode and designing and building the user interface with Interface Builder, and then he fills in the details expected of any working application, such as managing documents and windows, setting up the main menu, and configuring controls. Later recipes show you how to add important features such as a preferences window, printing, a Help book, and AppleScript support. The book concludes with a discussion of deployment of your finished product and steps you can take to explore additional features. Equipped with the expertise and real-world techniques in this book, programmers with some knowledge of C and Objective-C can quickly master the craft of writing Cocoa programs for Mac OS X.
- Written for C and Objective-C programmers who want to tap the extraordinary power and flexibility designed into the Cocoa frameworks, as well as for experienced Cocoa developers looking to extend their skills.
- By following the book’s recipes for creating a complete Cocoa application, readers can retrace the same steps to write any document-based Cocoa program.
Cocoa Api
- Includes the latest techniques for writing Cocoa applications for Mac OS X v10.6 Snow Leopard.
- Project source files are available on the Web at www.peachpit.com/cocoarecipes.
Sample Content
Table of Contents
Introduction. xi
About Vermont Recipes
Why Cocoa?
Why Objective-C?
Naming Conventions
Apple’s Cocoa Documentation
Xcode and Interface Builder
New Technologies
The Vermont Recipes Application Specification
Downloading and Installing the Project Files
About Vermont Recipes
Why Cocoa?
Why Objective-C?
Naming Conventions
Apple’s Cocoa Documentation
Xcode and Interface Builder
New Technologies
The Vermont Recipes Application Specification
Downloading and Installing the Project Files
Section 1: Objective-C and the Cocoa Frameworks
Ingredients: Language, Frameworks, and Tools
Appliances and Utensils
Ingredients
Serving Suggestions
Section 2: Building an Application
Recipe 1: Create the Project Using Xcode
Step 1: Create the New Project
Step 2: Explore the Project
Step 3: Set Xcode Preferences
Step 4: Revise the Document’s Header and Implementation Files
Step 5: Rename the Document’s Files
Step 6: Edit the Document’s Methods
Step 7: Create and Revise the Window Controller Files
Step 8: Edit the Credits File
Step 9: Edit the Info.plist File
Step 10: Edit the InfoPlist.strings File
Step 11: Create a Localizable.strings File
Step 12: Set the Project’s Properties and Build Settings
Step 13: Build and Run the Application
Step 14: Save and Archive the Project
Conclusion
Recipe 2: Design and Build the GUI Using Interface Builder
Step 1: Explore and Revise the Document Window’s Nib File
Step 2: Add a Toolbar
Step 3: Add a Vertical Split View
Step 4: Add a Horizontal Split View
Step 5: Add a Tab View
Step 6: Add a Drawer
Step 7: Add a Toolbar Item to Open and Close the Drawer
Step 8: Build and Run the Application
Step 9: Save and Archive the Project
Conclusion
Recipe 3: Create a Simple Text Document
Step 1: Create the DiaryDocument Class in Xcode
Step 2: Save a Snapshot of the Project
Step 3: Create the DiaryWindowController Class and Its Nib File in Interface Builder
Step 4: Add Scrolling Text Views to the Diary Window
Step 5: Create the VRDocument-Controller Class and a New Menu Item
Step 6: Add the Diary Document to the Info.plist File
Step 7: Read and Write the Diary Document’s Text Data
Step 8: Configure the Split View Diary Window
Step 9: Build and Run the Application
Step 10: Save and Archive the Project
Conclusion
Recipe 4: Add Controls to the Document Window
Step 1: Add Controls to the Diary Window
Step 2: Implement the Add Entry Push Button
Step 3: Implement the Add Tag Push Button
Step 4: Validate the Add Tag Push Button
Step 5: Implement and Validate the Navigation Buttons
Step 6: Implement and Validate the Date Picker
Step 7: Implement and Validate the Search Field
Step 8: Build and Run the Application
Step 9: Save and Archive the Project
Conclusion
Recipe 5: Configure the Main Menu
Step 1: Create the VRApplicationController Class
Step 2: Add a Read Me Menu Item to the Help Menu
Step 3: Add a Diary Menu to Control the Diary Window
Step 4: Add a Diary Tag Search Menu Item to the Find Submenu
Step 5: Add a Recipe Info Menu Item to Open the Recipes Window’s Drawer
Step 6: Build and Run the Application
Step 7: Save and Archive the Project
Conclusion
Recipe 6: Control the Document’s Behavior
Step 1: Organize the Project’s Code
Step 2: Limit the Application to a Single Diary Document
Step 3: Add Error Handling to the Diary Document
Step 4: Prepare Localizable Strings for Internationalization
Step 5: Build and Run the Application
Step 6: Save and Archive the Project
Conclusion
Recipe 7: Refine the Document’s Usability
Step 1: Set the Minimum and Maximum Sizes of the Document Windows
Step 2: Set the Initial Position and Size of the Document Windows
Step 3: Set the Standard Zoom Size of the Document Windows
Step 4: Autosave the Position and Size of the Document Windows
Step 5: Autosave the Position of the Divider in the Diary Window
Step 6: Autosave the Recipes Document’s Toolbar Configuration
Step 7: Autosave the Diary Document’s Contents
Step 8: Back Up the Diary Document
Step 9: Implement the Revert to Saved Menu Item
Step 10: Build and Run the Application
Step 11: Save and Archive the Project
Conclusion
Recipe 8: Polish the Application
Step 1: Add a Save As PDF Menu Item
Step 2: Use Alternating Show Recipe Info and Hide Recipe Info Menu Items
Step 3: Use a Dynamic Add Tag and Tag All Menu Item
Step 4: Use a Dynamic Add Tag and Tag All Button
Step 5: Use Blocks for Notifications
Step 6: Add Help Tags
Step 7: Add Accessibility Features
Step 8: Provide a Default Diary Document Name
Step 9: Add Support for Sudden Termination
Step 10: Internationalize the Application’s Display Name
Step 11: Add Application and Document Icons
Step 12: Enable the Application to Run Under Leopard
Step 13: Build and Run the Application
Step 14: Save and Archive the Project
Conclusion
Recipe 9: Add Printing Support
Step 1: Create a Print Panel Accessory View in Interface Builder
Step 2: Create an Accessory View Controller in Xcode
Step 3: Add the Accessory View Controller to the Print Panel
Step 4: Save Custom Print Settings
Step 5: Create a Print View to Print the Document’s Content
Step 6: Print Custom Headers and Footers
Step 7: Implement Print Scaling
Step 8: Build and Run the Application
Step 9: Save and Archive the Project
Conclusion
Recipe 10: Add a Preferences Window
Step 1: Design and Build a Preferences Window in Interface Builder
Step 2: Create a Preferences Window Controller in Xcode
Step 3: Configure the General Tab View Item
Step 4: Configure the Recipes Tab View Item
Step 5: Configure the Chef’s Diary Tab View Item
Step 6: Build and Run the Application
Step 7: Save and Archive the Project
Conclusion
Recipe 11: Add Apple Help
Step 1: Implement an HTML-Based Apple Help Bundle for Snow Leopard
Step 2: Add Topic, Task, and Navigation Pages
Step 3: Add an AppleScript Link to a Topic Page
Step 4: Use the HelpViewer help: Protocol
Step 5: Add Keywords and Abstracts
Step 6: Add Help Buttons to Alerts, Dialogs, and Panels
Step 7: Advanced Help Features
Step 8: Implement a Help Book for Leopard and Earlier
Step 9: Build and Run the Application
Step 10: Save and Archive the Project
Conclusion
Recipe 12: Add AppleScript Support
Step 1: Create a Terminology Dictionary and Add the Standard Suite
Step 2: Add the Vermont Recipes Suite and Extend the Application Class With a New Property
Step 3: Add a Diary Document Class and a Property in the Application to Access It
Step 4: Add the Text Suite and a Document Text Property
Step 5: Add a Diary Entry Class and an Element in the Diary Document to Access It
Step 6: Add Properties to Get and Set Diary Entry Values
Step 7: Add a Current Diary Entry Property to the Document Class
Step 8: Support the Make Command for New Diary Entries
Step 9: Support the Delete Command for Diary Entries
Step 10: Add a Custom Verb-First Command–Sort
Step 11: Add Custom Object-First Commands–Encrypt and Decrypt
Step 12: Move Along
Step 13: Build and Run the Application
Step 14: Save and Archive the Project
Conclusion
Recipe 13: Deploy the Application
Step 1: Build the Application for Release
Step 2: Test the Application
Step 3: Provide Documentation
Step 4: Provide User Support
Step 5: Distribute the Application
Step 6: Promote the Application
Conclusion
Recipe 1: Create the Project Using Xcode
Step 1: Create the New Project
Step 2: Explore the Project
Step 3: Set Xcode Preferences
Step 4: Revise the Document’s Header and Implementation Files
Step 5: Rename the Document’s Files
Step 6: Edit the Document’s Methods
Step 7: Create and Revise the Window Controller Files
Step 8: Edit the Credits File
Step 9: Edit the Info.plist File
Step 10: Edit the InfoPlist.strings File
Step 11: Create a Localizable.strings File
Step 12: Set the Project’s Properties and Build Settings
Step 13: Build and Run the Application
Step 14: Save and Archive the Project
Conclusion
Recipe 2: Design and Build the GUI Using Interface Builder
Step 1: Explore and Revise the Document Window’s Nib File
Step 2: Add a Toolbar
Step 3: Add a Vertical Split View
Step 4: Add a Horizontal Split View
Step 5: Add a Tab View
Step 6: Add a Drawer
Step 7: Add a Toolbar Item to Open and Close the Drawer
Step 8: Build and Run the Application
Step 9: Save and Archive the Project
Conclusion
Recipe 3: Create a Simple Text Document
Step 1: Create the DiaryDocument Class in Xcode
Step 2: Save a Snapshot of the Project
Step 3: Create the DiaryWindowController Class and Its Nib File in Interface Builder
Step 4: Add Scrolling Text Views to the Diary Window
Step 5: Create the VRDocument-Controller Class and a New Menu Item
Step 6: Add the Diary Document to the Info.plist File
Step 7: Read and Write the Diary Document’s Text Data
Step 8: Configure the Split View Diary Window
Step 9: Build and Run the Application
Step 10: Save and Archive the Project
Conclusion
Recipe 4: Add Controls to the Document Window
Step 1: Add Controls to the Diary Window
Step 2: Implement the Add Entry Push Button
Step 3: Implement the Add Tag Push Button
Step 4: Validate the Add Tag Push Button
Step 5: Implement and Validate the Navigation Buttons
Step 6: Implement and Validate the Date Picker
Step 7: Implement and Validate the Search Field
Step 8: Build and Run the Application
Step 9: Save and Archive the Project
Conclusion
Recipe 5: Configure the Main Menu
Step 1: Create the VRApplicationController Class
Step 2: Add a Read Me Menu Item to the Help Menu
Step 3: Add a Diary Menu to Control the Diary Window
Step 4: Add a Diary Tag Search Menu Item to the Find Submenu
Step 5: Add a Recipe Info Menu Item to Open the Recipes Window’s Drawer
Step 6: Build and Run the Application
Step 7: Save and Archive the Project
Conclusion
Recipe 6: Control the Document’s Behavior
Step 1: Organize the Project’s Code
Step 2: Limit the Application to a Single Diary Document
Step 3: Add Error Handling to the Diary Document
Step 4: Prepare Localizable Strings for Internationalization
Step 5: Build and Run the Application
Step 6: Save and Archive the Project
Conclusion
Recipe 7: Refine the Document’s Usability
Step 1: Set the Minimum and Maximum Sizes of the Document Windows
Step 2: Set the Initial Position and Size of the Document Windows
Step 3: Set the Standard Zoom Size of the Document Windows
Step 4: Autosave the Position and Size of the Document Windows
Step 5: Autosave the Position of the Divider in the Diary Window
Step 6: Autosave the Recipes Document’s Toolbar Configuration
Step 7: Autosave the Diary Document’s Contents
Step 8: Back Up the Diary Document
Step 9: Implement the Revert to Saved Menu Item
Step 10: Build and Run the Application
Step 11: Save and Archive the Project
Conclusion
Recipe 8: Polish the Application
Step 1: Add a Save As PDF Menu Item
Step 2: Use Alternating Show Recipe Info and Hide Recipe Info Menu Items
Step 3: Use a Dynamic Add Tag and Tag All Menu Item
Step 4: Use a Dynamic Add Tag and Tag All Button
Step 5: Use Blocks for Notifications
Step 6: Add Help Tags
Step 7: Add Accessibility Features
Step 8: Provide a Default Diary Document Name
Step 9: Add Support for Sudden Termination
Step 10: Internationalize the Application’s Display Name
Step 11: Add Application and Document Icons
Step 12: Enable the Application to Run Under Leopard
Step 13: Build and Run the Application
Step 14: Save and Archive the Project
Conclusion
Recipe 9: Add Printing Support
Step 1: Create a Print Panel Accessory View in Interface Builder
Step 2: Create an Accessory View Controller in Xcode
Step 3: Add the Accessory View Controller to the Print Panel
Step 4: Save Custom Print Settings
Step 5: Create a Print View to Print the Document’s Content
Step 6: Print Custom Headers and Footers
Step 7: Implement Print Scaling
Step 8: Build and Run the Application
Step 9: Save and Archive the Project
Conclusion
Recipe 10: Add a Preferences Window
Step 1: Design and Build a Preferences Window in Interface Builder
Step 2: Create a Preferences Window Controller in Xcode
Step 3: Configure the General Tab View Item
Step 4: Configure the Recipes Tab View Item
Step 5: Configure the Chef’s Diary Tab View Item
Step 6: Build and Run the Application
Step 7: Save and Archive the Project
Conclusion
Recipe 11: Add Apple Help
Step 1: Implement an HTML-Based Apple Help Bundle for Snow Leopard
Step 2: Add Topic, Task, and Navigation Pages
Step 3: Add an AppleScript Link to a Topic Page
Step 4: Use the HelpViewer help: Protocol
Step 5: Add Keywords and Abstracts
Step 6: Add Help Buttons to Alerts, Dialogs, and Panels
Step 7: Advanced Help Features
Step 8: Implement a Help Book for Leopard and Earlier
Step 9: Build and Run the Application
Step 10: Save and Archive the Project
Conclusion
Recipe 12: Add AppleScript Support
Step 1: Create a Terminology Dictionary and Add the Standard Suite
Step 2: Add the Vermont Recipes Suite and Extend the Application Class With a New Property
Step 3: Add a Diary Document Class and a Property in the Application to Access It
Step 4: Add the Text Suite and a Document Text Property
Step 5: Add a Diary Entry Class and an Element in the Diary Document to Access It
Step 6: Add Properties to Get and Set Diary Entry Values
Step 7: Add a Current Diary Entry Property to the Document Class
Step 8: Support the Make Command for New Diary Entries
Step 9: Support the Delete Command for Diary Entries
Step 10: Add a Custom Verb-First Command–Sort
Step 11: Add Custom Object-First Commands–Encrypt and Decrypt
Step 12: Move Along
Step 13: Build and Run the Application
Step 14: Save and Archive the Project
Conclusion
Recipe 13: Deploy the Application
Step 1: Build the Application for Release
Step 2: Test the Application
Step 3: Provide Documentation
Step 4: Provide User Support
Step 5: Distribute the Application
Step 6: Promote the Application
Conclusion
Section 3: Looking Ahead
Recipe 14: Add New Technologies
Step 1: Switch to Properties
Step 2: Switch to Cocoa Bindings
Step 3: Switch to Garbage Collection
Conclusion
Recipe 14: Add New Technologies
Step 1: Switch to Properties
Step 2: Switch to Cocoa Bindings
Step 3: Switch to Garbage Collection
Conclusion
More Information
Other Things You Might Like
- Book $55.99
- eBook (Watermarked) $55.99
Cocoa For Mac
![Cocoa For Mac Cocoa For Mac](/uploads/1/1/8/7/118743399/114303026.jpg)
Cocoa Mac Os
- Web Edition $55.99