How can I add a menu item inside a sub menu programmatically?
+1
A:
Use -[NSMenu addItem:]
et al, e.g.:
NSMenu *subMenu = ...;
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@"foo"
action:@selector(fooClicked:) keyEquivalent:@""];
[item autorelease];
[item setTarget:self];
[subMenu addItem:item];
Georg Fritzsche
2010-07-10 13:45:27