• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Newbie] Document Format Advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Bundle compile problems
  • Next by Date: Re: AddressBook: getting "address format"
  • Previous by thread: Re: [Newbie] Document Format Advice
  • Next by thread: sub classing NSTableView
  • Index(es):
    • Date
    • Thread