dictionaryWithContentsOfFile
dictionaryWithContentsOfFile
- Subject: dictionaryWithContentsOfFile
- From: James Stroud <email@hidden>
- Date: Sun, 23 May 2004 21:17:20 -0600
Hello all,
I want to make a NSDictionary with the dictionaryWithContentsOfFile.
Everything works fine when in XCode. I use the path
@"MyApp.app/Contents/Resources/mydict.plist". But then it can't find
the file when I move the build to the desktop (get a null). Where does
my application think it is? To test this, I used writeToFile:atomically
but couldn't find where it wrote the file when I moved the build. I
found the file just fine when running with XCode (wrote into the
"build" directory, one level above MyApp.app). I don't want to
hard-code some of these dictionaries and would rather do by plist.
Isn't this the point of a bundle? I want the files in the .app
directory and don't want to rely on an absolute path (or ~ path, for
that matter). I want the files to never leave the bundle (read-only is
fine).
James
---------------------------------------------------------
James Stroud
Department of Chemistry
University of Colorado
Boulder, CO 80309-0215, USA
tel: 303-492-4503
www:
http://JamesStroud.com/
--------------------------------------------------------
_______________________________________________
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.