• 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: Problem with NSData to NSString to NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NSData to NSString to NSData


  • Subject: Re: Problem with NSData to NSString to NSData
  • From: Ricky Sharp <email@hidden>
  • Date: Wed, 29 Oct 2008 16:56:42 -0500


On Oct 29, 2008, at 3:46 PM, Joel Norvell wrote:

Dear Cocoa-dev People,

First, I wanted to thank Aki Inoue and Rob Keniger for pointing out the problem with my NSData->NSString->NSData approach.

As an alternative, would it be fruitful to use a Directory Wrapper to represent the data as two files; one the metadata and the other the pdf? Then I could work with the metadata file, but just display the pdf file.

In the "What could go wrong here?" department, would my compound file end up behaving like a directory (or worse)?


From your original implementation of putting the metadata directly into the PDF file, you'll now end up with obviously a proprietary file. i.e. No application that works with PDF will be able to work with that file.

By having a separate file, things can become fragile. However, the solution here is to use a package type for a custom document. Just as TextEdit does for the rtfd type.

Your "package" folder would then contain the original PDF and a separate file (or files) for your metadata.

This document type would most likely not be openable in any app that opens PDF (unless their open dialogs have the 'allow navigation of packages' option set). But, advanced users could your package via Finder and work with the PDF directly if they need to.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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: Problem with NSData to NSString to NSData
      • From: "Dave Geering" <email@hidden>
References: 
 >Re: Problem with NSData to NSString to NSData (From: Joel Norvell <email@hidden>)

  • Prev by Date: Re: Is there an equivalent to std::min/std::max for Cocoa programmer's
  • Next by Date: [MEET] CocoaHeads Mac Developer Meetings
  • Previous by thread: Re: Problem with NSData to NSString to NSData
  • Next by thread: Re: Problem with NSData to NSString to NSData
  • Index(es):
    • Date
    • Thread