Hi,
I have created an NSStatusBar in the following way, but the items are not enabled for me to press. I can't see anything that I have done wrong.
I have created an NSStatusBar in the following way, but the items are not enabled for me to press. I can't see anything that I have done wrong.
Code:
bar = [NSStatusBar systemStatusBar];
statusBarItem = [bar statusItemWithLength:NSVariableStatusItemLength];
[statusBarItem retain];
[statusBarItem setTitle: NSLocalizedString(@"GS",@"")];
[statusBarItem setHighlightMode:YES];
theMenu = [[[NSMenu alloc] init] autorelease];
[statusBarItem setMenu:theMenu];
NSMenuItem* menuBarItem;
menuBarItem = [[NSMenuItem alloc] initWithTitle:@"Quit" action:@selector(quit:) keyEquivalent:@""];
[theMenu addItem:menuBarItem];