Re: How to get PrivateFramework's URL
Re: How to get PrivateFramework's URL
- Subject: Re: How to get PrivateFramework's URL
- From: Noriaki Misawa <email@hidden>
- Date: Mon, 24 Mar 2003 15:25:57 +0900
Thank you.
But I'm writing the Command Line Tool. So, I don't use Cocoa.
On 2003.3.18, at 14:48 Asia/Tokyo, Nick Zitzmann wrote:
On Monday, March 17, 2003, at 09:29 PM, Noriaki Misawa wrote:
I want to get a file in PrivateFramework.
It is
System/Library/PrivateFrameworks/NetworkConfig.framework/Versions/A/
Resources/Japanese.lproj/PortNames.strings.
I want to read this file. How to get this URL?
Assuming you are using Cocoa, try something like this: (note - written
in Mail, not tested, use at your own risk, etc.)
NSBundle *networkConfigBundle = [NSBundle
bundleWithPath:@"/System/Library/PrivateFrameworks/
NetworkConfig.framework"];
NSString *pathToResource = [networkConfigBundle
pathForResource:@"PortNames.strings"];
NSURL *urlToResource = [NSURL fileURLWithPath:pathToResource];
Then "urlToResource" should hold the URL to the file
"PortNames.strings" on the user's system. This ought to return the
user's localized PortNames.strings file...
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://dreamless.home.attbi.com/
Smile! It confuses people!
_______________________________________________
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.
_______________________________________________
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.