• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBundle pathfinding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >NSBundle pathfinding (From: Ulrik Sverdrup <email@hidden>)

  • Prev by Date: Re: Inconsistent Memory Management Rules
  • Next by Date: Re: Executing nextKeyView from NSDrawer to NSWindow
  • Previous by thread: NSBundle pathfinding
  • Next by thread: Re: Newbie: Current Apps Directory
  • Index(es):
    • Date
    • Thread