Forum Navigation
You need to log in to create posts and topics.

Setting a different menubar ( or other approach ) in Cocoa/Objective-C

Posted by: fblistserve <fblistserve@...>

My app displays a slightly different menu bar for shareware and Mac App Store ( MAS ) users. The shareware users see the registration option in the File menu and the "Check for Updates" in the app menu. MAS users aren’t presented these irrelevant options.

My Carbon app code simply loads the correct menubar for the user( MAS or shareware ) using Carbon calls CreateNibReference() and  SetMenuBarFromNib() ( actually a compile-time directive '#if' makes the decision about which menubar to load and thus the decision is "baked in" at compile time when creating either a MAS executable or shareware executable ).
Now it is time to implement this functionality for a Cocoa app with a nib ( and obviously without Carbon calls ). NSBundle and NSNib calls showed up in my searches but so far I’m not sure how to accomplish the goal. Any thoughts welcome.
TIA.

Brian S.


To unsubscribe, e-mail: fbcocoa-unsubscribe@welovegod.org For additional commands, e-mail: fbcocoa-help@freegroups.net