New Tiger NSDocument API's
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