> On Jun 5, 2016, at 1:27 AM, Graham Cox <graham....@bigpond.com> wrote:
> 
> 
>> On 5 Jun 2016, at 8:02 AM, Daryle Walker <dary...@mac.com> wrote:
>> 
>> You have to come up with a new extension.  For instance, if you’re already 
>> using “.xyz” for you single-file format, you could use “.xyz-pkg” for your 
>> package format.
> 
> 
> You can use the same extension and leave it to your app to figure out which 
> it’s actually dealing with - the extension is only used to map the file to an 
> app that can open it - after that the file will be passed to NSDocument as a 
> NSFileWrapper whatever its contents - packagae or flat file. Your app can 
> then determine which it is based on some private knowledge about its 
> structure.
> 
> Alternatively, make up a  new extension - the amount of work for your app is 
> about the same, so the question is whether you want to disguise the change 
> for end users.
> 
> —Graham

My favorite way to deal with bundle documents is to just override 
readFromURL:ofType:error:, make an NSBundle from that, and load things lazily 
as needed.

Every time I’ve ever tried to use NSFileWrapper, I’ve always ended up having to 
switch to something else because of the memory issue that Jens mentions. Never 
really understood the point of that class.

Charles


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to