• 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: mw <email@hidden>
  • Date: Sat, 28 Sep 2002 17:31:17 -0400

> 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
_______________________________________________
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: [NEWBIE QUESTION] What message is sent when window contents finish loading?
  • Next by Date: Re: Sending boolean value via XML-RPC using WebServicesCore.framework
  • Previous by thread: [Newbie] Document Format Advice
  • Next by thread: Re: [Newbie] Document Format Advice
  • Index(es):
    • Date
    • Thread