Newbie-Saving file in Tiger
Newbie-Saving file in Tiger
- Subject: Newbie-Saving file in Tiger
- From: Steve Gran <email@hidden>
- Date: Mon, 10 Oct 2005 10:52:19 -0700
I have to preface this by saying I'm a very new newbie. I'm retired
and the only programming experience I had was back in my undergrad
days I learned COBOL (and yes, I made sure to forget it as soon as
the class was done). I'm currently taking a C++ class at a local
community college to at least get an understanding in how to program
and learn something about object oriented programming (unfortunately
I could not find any Objective C classes at any college here). Which
is sad since I live in Livermore which is about a 50min drive from
Cupertino.
Anyway, I'm also going thru Hillegass' excellent book and am now on
the subject of saving with NSKeyedArchiver. But in Xcode under the
dataRepresentationOfType method the following comment says "For
applications targeted for Tiger or later systems, you should use the
new Tiger API -dataOfType:error:"
Well I looked at the documentation but still don't understand how to
use this correctly. Remember I'm like a six year old when it comes
to programming.
If I'm just setting up a simple save my document to a file, what is
the correct to use this?
Would it be...
- (NSData *)dataOfType:(NSString *)aType
{
return [NSKeyedArchiver archivedDataWithRootObject:tasks];
//where "tasks" is the class I'm trying to save
return nil;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden