I don't understand why you wouldn't use Interface Builder and nib files if you're writing Cocoa applications. Interface Builder is one of the reasons why writing Cocoa applications is easier than writing applications with other frameworks. You can easily add an item to the application menu in Interface Builder. Drag a menu item to the application menu.
If you're still determined to add a menu item in code, look at the NSMenuItem and NSMenu documentation. The initWithTitle method in the NSMenuItem class creates a menu item, and the addItem method in the NSMenu class adds the newly created item to a menu.




LinkBack URL
About LinkBacks
)
Reply With Quote
NSMenu*)menu;
Bookmarks