Re: [Newbie] Document Format Advice
Re: [Newbie] Document Format Advice
- Subject: Re: [Newbie] Document Format Advice
- From: Mike Davis <email@hidden>
- Date: Sun, 29 Sep 2002 00:03:20 +0100
On Saturday, September 28, 2002, at 10:59 PM,
email@hidden wrote:
Date: Sat, 28 Sep 2002 17:31:17 -0400
Subject: Re: [Newbie] Document Format Advice
From: mw <email@hidden>
To: <email@hidden>
Cc: <email@hidden>
Heya all --
I am trying to figure out the best file format for my application.
What
I would like to do is to be able to store several documents of
different
file types in one, double-clickable location. I'm guessing that this
is
pretty much how a bundle works, but I'm not too sure. Should I try to
figure out a way of using a bundle, or should I serialize all the
documents into one flat file?
thanks for any advice!
-Lucas
Well, you could use a File Wrapper instead of a flat file if you REALLY
wanted to keep the different files separate. I have never personally
used
file wrappers before, so you'd have to do the research yourself with
Apple's
cocoa docs. All I know is you have to (in your document class) change
the
methods dataRepresentationOfType and loadDataRepresentation to the
following:
- (NSData *)fileWrapperRepresentationOfType:(NSString *)aType;
and
- (BOOL)loadFileWrapperRepresentation:(NSData *)data ofType:(NSString
*)aType
respectively. That way, file wrappers are loaded instead. Beyond that,
I
have no clue how to use them, so good luck! Hope I was of some help to
you.
mw
Don't forget to set the file wrapper checkbox in PB!
_______________________________________________
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.