Re: Hand-building an Application Menu
Re: Hand-building an Application Menu
- Subject: Re: Hand-building an Application Menu
- From: "Michael Ash" <email@hidden>
- Date: Fri, 17 Oct 2008 10:20:40 -0400
On Thu, Oct 16, 2008 at 6:45 PM, Russ <email@hidden> wrote:
> My menus are generated programmatically, not with a NIB (non-negotiable).
I know you say "non-negotiable", but I'm going to discuss it anyway,
because there are some facts you may not be aware of.
First fact: Cocoa does not support nibless applications, period, full
stop. It's possible to create them with some hacking around and using
private methods, but it is not *supported*. Any such app which you may
finally get working could potentially break at any moment, due to an
OS upgrade or simply due to running on a different computer.
Second fact: any GUI application can load a nib, even yours. Loading a
nib doesn't mean you can't set things up in code. Loading a nib
doesn't mean you need to bundle a file inside your .app (although it
makes it easier!) and it doesn't mean you have to give up control.
You'll have a much easier time of it if you do what a normal Cocoa app
does and load a regular MainMenu.nib. This doesn't have to load a full
menu bar, it can just be a stub if you want, and you can then fill it
out with code. The end result will be the same, except it will be
supported and will presumably actually work.
Mike
_______________________________________________
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