Hi everyone,

my Cocoa app (Objective-C++) works perfectly from within Xcode. However when I double click the application in Finder it does not load my data file.The file is a short text file which was placed next to the executable in the "build>Debug" or "build>Release" folders. It is loaded with standard C++ <iostream> methods. Now, however, I'd like to place this file somewhere within the Application contents folder and load it from there, so I can use the app as a standalone.

1. I know this is not the recommended way to open a file in a Cocoa App, but this is just a quick utility for use in class, so I don't wan't to change my file loading code and deal with File dialogs, bundle loading or preferences. This is not really a preferences file either. It contains some data which is vital to the application but will not be modified by the user.

2. Where should I place the file?

3. How do I direct my executable to it so that I can load it with my stream reading code?

4. Can it be done with a path in info.plist or  somethinglike that?

Thanks already for any help/suggestion/link.

Carlos
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to