Re: Works in PB yet not in Stand alone
Re: Works in PB yet not in Stand alone
- Subject: Re: Works in PB yet not in Stand alone
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 14 Apr 2003 04:04:46 -0700
On Monday, April 14, 2003, at 03:28 AM, Craig Bakalian wrote:
I have isolated a bit of code that works in PB but not in my stand
alone, or when I double click the product app. What is wrong with
this->
NSString *file;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSDirectoryEnumerator *enumerator = [fileManager enumeratorAtPath:
@"./"];
You're using a relative path. It's a bad idea to use relative paths in
applications, since your application should assume that the PWD could
be variable. Your application will only work when the PWD is your
application's build directory, but the Finder launches them with / set
to the PWD.
What exactly is your code supposed to do? I'm guessing it's supposed to
scan a directory for files with the extension "tfcy", but does your
application expect these tfcy files to be found in the same directory
as the application itself?
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page:
http://dreamless.home.attbi.com/
"Building the future and keeping the past alive are one and the same
thing." - Metal Gear Solid 2
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.