I want my status menu to call a function when it is clicked. What's the method that would let me assign that action? Something like this below but for the menu itself.
NSMenuItem* item = [[NSMenuItem alloc] initWithTitle:@"Title" action:@selector(doX) keyEquivalent:@""];