Re: Extracting file name & path from NSOpenPanel
Re: Extracting file name & path from NSOpenPanel
- Subject: Re: Extracting file name & path from NSOpenPanel
- From: Phil Faber <email@hidden>
- Date: Sun, 2 Apr 2006 23:12:34 +0100
Look in your code, you are already using the filename and path!
Below is part of your code:
NSString *content = [NSString stringWithContentsOfFile:[panel
filename]];
the [panel filename] is the filename of the file you selected.
So, just use:
NSString *myFile = [panel filename];
- Bobby
That's worked fine. Thanks a lot. I had discovered
'stringWithContentsOfFile' and was working on the assumption that I
needed to find something equivalent such as:
NSString *content = [NSString stringWithFileName:[panel filename]];
(For other newbies: I just made up the line above ... don't try that
at home!)
Thanks Bobby.
_______________________________________________
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