Trying to open a file
Trying to open a file
- Subject: Trying to open a file
- From: Christian Graus <email@hidden>
- Date: Wed, 18 Feb 2009 17:35:53 +1100
Hi guys
So, I've got a file open dialog, and I have this code:
NSString * path = @"file://";
NSString * p = [open filename];
path = [path stringByAppendingString:p ];
NSURL * xmlURL = [[NSURL alloc] initWithString:path ];
NSXMLDocument *doc = [[NSXMLDocument alloc] initWithContentsOfURL:xmlURL
options:0 error:&error];
This WAS working fine. I added the file:// bit to make it work, b/c
otherwise, it would not. It's now failing. I've tried to just pass p, in
case the default path works now, but no matter what I try, p is
/Users/christiangraus/whatever, the path to the file, but xmlURL is nil.
Any suggestions gratefully accepted.
Christian
_______________________________________________
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