Re: Saving "objects" & opening them up in a non-document based App
Re: Saving "objects" & opening them up in a non-document based App
- Subject: Re: Saving "objects" & opening them up in a non-document based App
- From: "Louis C. Sacha" <email@hidden>
- Date: Thu, 15 Jan 2004 02:50:59 -0800
Hello...
Take a look at the documentation for
NSKeyedArchiver/NSKeyedUnarchiver, and also there is a topic about
archiving in the Cocoa Conceptual documentation.
in 10.3 developer docs:
/Developer/Documentation/Cocoa/Conceptual/Archiving/index.html
/Developer/Documentation/Cocoa/Conceptual/Archiving/Tasks/codingobjects.html
in 10.2
/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/Archiving/index.html
/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/Archiving/Tasks/codingobjects.html
Essentially, you can implement the two methods from the <NSCoding>
protocol, encodeWithCoder: and initWithCoder:, and then use an
archiver/unarchiver to write/read from your class to a data file.
Hope that helps,
Louis
I have a Cocoa application (non document based) and i want to save
the data in a class i created (NSObject:myObject) to a file and be
able to open it back up. ive browzed the net but all i find is stuff
for document based apps. i really need some help, sample code or
tutorials cause i have no idea where to begin.
Aaron Boothello.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.