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

New Tiger NSDocument API's


  • Subject: New Tiger NSDocument API's
  • From: Philip Ershler <email@hidden>
  • Date: Sun, 12 Jun 2005 22:53:43 -0600

OK, I'm lost,
    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.

Thanks, Phil


- (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper ofType:(NSString *)typeName error:(NSError **)outError
{
    CFReadStreamRef    myStream;
    Boolean    openResult;

//    How do I get the CFURLRef fileURL?

     

    myStream = CFReadStreamCreateWithFile (kCFAllocatorDefault, fileURL);

    

    openResult = CFReadStreamOpen (myStream);

 _______________________________________________
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: Sherm Pendley <email@hidden>
    • Re: New Tiger NSDocument API's
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Viewing code generated Core Data models
  • Next by Date: Re: New Tiger NSDocument API's
  • Previous by thread: printing with webkit
  • Next by thread: Re: New Tiger NSDocument API's
  • Index(es):
    • Date
    • Thread