Re: about framework
Re: about framework
- Subject: Re: about framework
- From: Michael Monscheuer <email@hidden>
- Date: Wed, 03 Dec 2003 12:18:59 +0100
Chong Hiu Pun wrote:
I make a framework and deploy into another MAC OS X 10.3 machine by copying
the framework to /System/Library/Frameworks/My.framework) . The framework will
open text file and do some processing. However, when my command-line program
call this framework, it cannot located the text files (I placed the text files
in the same directory of the executable) . If I copy those text files to the
framework directory, the result is the same. How should I solve it? Thank you
very much.
If you want to access files of your framework or application, you'll
have to use the NSBundle class to get the according bundle path (either
the programs' bundle or the frameworks bundle).
After you retrieved the bundles' path, you will be able to access the
files using bundles' path.
NSBundle offers some nice methods to find out the main bundle or a
bundle a given class has been loaded from.
Hope that helps...
MiMo
--
=======================================================
And refashioning the fashioned
lest it stiffen into iron
is work of endless vital activity.
[Goethe]
mailto:email@hidden
mailto:email@hidden
All about CALAMUS DTP suite:
http://www.calamus.net
=======================================================
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.