• 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: New Tiger NSDocument API's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Tiger NSDocument API's


  • Subject: Re: New Tiger NSDocument API's
  • From: Philip Ershler <email@hidden>
  • Date: Mon, 13 Jun 2005 10:01:37 -0600


On Jun 12, 2005, at 11:18 PM, j o a r wrote:


On 12 jun 2005, at 21.53, Philip Ershler wrote:


I'm trying to get up to speed with the Tiger NSDocument API's. I'm just trying to open a stream to my own type of file. Here's the code I'm trying to use. I am (as the template comments in MyDocument suggests) overriding readFromFileWrapper:(NSFileWrapper *)fileWrapper ofType:(NSString *)typeName error:(NSError **) outError. What I can't figure out is how to get the CFURLRef to create the CFReadStream. If I set a breakpoint in this method, I can see the appropriate URL pointing to the file that I chose in the Open Dialog with the debugger. If there is some sample code or documentation you can point me to, that would be great. Otherwise a hint would sure be appreciated.


May I first of all ask what you're trying to do? Could you describe the type of files you're working with, and anything else about you're app that might be important for the reading / writing of documents?

The files I need to read (and ultimately write) are custom format files that come from a data acquisition system that has been designed and built in our institute. The files consist of a 1024 byte header followed by a stream of 16 bit integers. Total files size may run from several hundred kilobytes to 1 or 2 gigabytes.




Also, why are you using functionality from CF? Do you have a special reason to not use the Cocoa ("NS") API? Is the file too large to be read all at once, and in that case, why not use NSFileHandle?

I was just (perhaps naively) following the suggestion in the NSDocument template that I got when I started a Cocoa Document based app.


I appreciate your time and welcome any and all suggestions.

Phil



j o a r




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: New Tiger NSDocument API's
      • From: j o a r <email@hidden>
    • Re: New Tiger NSDocument API's
      • From: Bill Bumgarner <email@hidden>
References: 
 >New Tiger NSDocument API's (From: Philip Ershler <email@hidden>)
 >Re: New Tiger NSDocument API's (From: j o a r <email@hidden>)

  • Prev by Date: Re: Warning: critical Core Data documentation flaw
  • Next by Date: Re: Bug in [path containsPoint]?
  • Previous by thread: Re: New Tiger NSDocument API's
  • Next by thread: Re: New Tiger NSDocument API's
  • Index(es):
    • Date
    • Thread