• 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
NSDocument custom file Package or URL override?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocument custom file Package or URL override?


  • Subject: NSDocument custom file Package or URL override?
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 15 May 2013 08:14:27 -0700
  • Thread-topic: NSDocument custom file Package or URL override?

My document format needs to look like:

File (actually a directory marked as a package)
-- MyData.plist
-> Images (directory)
----> Image1.png
----> Image2.png
-> Data (directory)
----> Data1.dat
----> Data2.dat
-> Icons (directory)
----> Icon1.png
----> Icon1.png


In my NSDocument subclass, Overriding:

- (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper
ofType:(NSString *)typeName error:(NSError **)outError

Doesn't seem to be the right thing to do since it seems to want to put all
the files in a single flat directory within the package

Overriding:

-(BOOL)readFromURL:(NSURL *)inAbsoluteURL
ofType:(NSString *)inTypeName error:(NSError **)outError

This seems a bit better but seems designed to read from a single file... Can
that file be my directory/package.

What is the best way to do this?




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSDocument custom file Package or URL override?
      • From: Markus Spoettl <email@hidden>
  • Prev by Date: Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
  • Next by Date: Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
  • Previous by thread: Re: UIView drawRect will update whole bounds
  • Next by thread: Re: NSDocument custom file Package or URL override?
  • Index(es):
    • Date
    • Thread