• 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: Versioning MainMenu.nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Versioning MainMenu.nib


  • Subject: Re: Versioning MainMenu.nib
  • From: j o a r <email@hidden>
  • Date: Wed, 4 Jun 2008 09:42:57 -0700


On Jun 3, 2008, at 8:12 PM, Chris Outwin wrote:

I have MainMenu.nib and MainMenu(Debug).nib in a Cocoa document app using Xcode 3.0. The (Debug)version has controls only used during development. I am trying to use build settings to dynamically load the MainMenu(Debug).nib when PreprocessorMacros has a value associated with the debug configuration.

The only example I've found is AppeanceSample: a Carbon app which does not have <key>NSMainNibFile</key> <string>MainMenu</string> in the Info.plist. This key/value pair may be my problem.

How do you dynamically select between two version of MainMenu.nib in a Cocoa document app?


Having extra menu items added to your debug builds is not an uncommon practice. Most of the time though, developers choose to not replace the whole menu, but rather just add a special "Debug" menu at the end of their regular menu bar.

You could load this debug menu from a nib file, but I would probably suggest that you just create and insert it programatically. See the API in NSApplication (for how to get a reference to the main menu), and the API in NSMenu & NSMenuItem (for how to create and insert the menu).

j o a r


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Versioning MainMenu.nib (From: Chris Outwin <email@hidden>)

  • Prev by Date: Re: Versioning MainMenu.nib
  • Next by Date: RE: Key-Value pairs
  • Previous by thread: Re: Versioning MainMenu.nib
  • Next by thread: Re: Opening column for edit after adding to tree controller?
  • Index(es):
    • Date
    • Thread