Re: NSBundle pathfinding
Re: NSBundle pathfinding
- Subject: Re: NSBundle pathfinding
- From: David Remahl <email@hidden>
- Date: Tue, 15 Apr 2003 22:16:17 +0200
A literal answer to your question
NSString *pathToNib = [[NSBundle mainBundle] pathForResource:@"About"
ofType:@"nib"];
What you may want instead:
[[NSBunde mainBundle] loadNibNamed:@"About" owner:self];
If you use the second one, the Cocoa will locate the correct nib file
for you if there are different localizations.
/ Rgds, David
On Tuesday, April 15, 2003, at 09:57 PM, Ulrik Sverdrup wrote:
Hello; a question concerning a challenge in Hillegass' Book:
How do I with NSBundle find the path to a nib (About.nib) in my App
bundle so that I'll get the path whichever localization is used.
Thanks / Ulrik Sverdrup
_______________________________________________
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.