Re: trick to getting an NSMenu to be app's main menu?
Chad Leigh -- ObjectWerks Inc <chad+macosx-AU1NHruoRJaEK/[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 8, 2010, at 7:45 PM, Kyle Sluder wrote: > On Mon, Feb 8, 2010 at 6:28 PM, Chad Leigh -- ObjectWerks Inc > <chad+macosx-AU1NHruoRJaEK/[email protected]> wrote: >> Is there a trick to replacing the main menu? I have read through the menu handling and NSApplication bits on apple.com but did not see anything obvious. > > This isn't supported. There's a lot of hackery going on inside AppKit > to implement NSMenu on top of the Carbon Menu Manager. > > What you're doing isn't likely to work anyway, since you seem not to > be running the main runloop. But then again, you have omitted a decent > chunk of code. This got me thinking so I added in the normal app runloop in addition to my own and now the menu comes up correctly. I basically needed it for the keyboard shortcuts for COPY in case a user wants to use a different email client other than Mail to send in a registration request. Thanks for the input Chad