• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
dictionaryWithContentsOfFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: dictionaryWithContentsOfFile
      • From: Wade Tregaskis <email@hidden>
    • Re: dictionaryWithContentsOfFile
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: NSPoint and automatic constructor
  • Next by Date: NSImageView setAnimates - Does this work?
  • Previous by thread: Re: Setting NSImageView back to default
  • Next by thread: Re: dictionaryWithContentsOfFile
  • Index(es):
    • Date
    • Thread