Skip to Main Content
Mac OSX Developer's Guide
book

Mac OSX Developer's Guide

by Jesse Feiler
October 2001
Intermediate to advanced content levelIntermediate to advanced
594 pages
21h 44m
English
Morgan Kaufmann
Content preview from Mac OSX Developer's Guide
Archiving, Serialization, and Distribution 9 479
There are two parts to this process. First, store the name of the
class in addition to the data. In the underlined code of prop-
ertyListRepresentation, the name of your object's class
is retrieved and stored in the dictionary that will serialize the
object's data.
On retrieval, convert the class name string to an actual class.
Then create an instance of this class. (The two necessary lines
of code are underlined.) Note that in Java, you need to coerce
the NSObject result of newInstance to your own class.
This recipe is from the Sketch example, and its use there is
typical. In Sketch, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

OSX Mavericks Essentials

OSX Mavericks Essentials

Wiley
Beginning Mac OS® X Programming

Beginning Mac OS® X Programming

Michael Trent, Drew McCormack
Cocoa in a Nutshell

Cocoa in a Nutshell

Michael Beam, James Duncan Davidson
Cocoa Programming for OS X: The Big Nerd Ranch Guide

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Aaron Hillegass, Adam Preble, Nate Chandler

Publisher Resources

ISBN: 9780122513411