Use GetProcessBundleLocation to find your app.
Using vRefNum/parID of 0,0 to find the app directory was deprecated
before OS X came out at all :)
On May 8, 2006, at 4:22 PM, Stephen Kay wrote:
I'm porting a classic app to Mach-O. I used to load some default
data files
on startup, that would be located in the same folder as the
application. (I
don't want to put these in the bundle/package, BTW).
It used to be that I would just call FSMakeFSSpec(0, 0, fileName,
&fsSpec),
with the name of the file, and it would automatically find it in
the same
folder as the app. This no longer seems to work.
Questions:
- can this still work in OS X, or am I supposed to be using CF
methods for
all of this?
- can someone provide an example of how to do this, or a pointer to
some
example code that shows this? I'm lost on which of the gazillion CF
calls to
use to construct this.
Thanks,
- Stephen
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen Kay
Karma Lab - developers of KARMA
http://www.karma-lab.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/jstiles%
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden