I need dynamically enabling voice on a NSMenu. The first check is done with validateMenuItem in this way:
-(BOOL)validateMenuItem:(NSMenuItem *)menuItem{
NSMenuItem *item = [self.menu itemAtIndex:0];
if(menuItem == item){
return self.streamIsOpen;
}
return YES;
}
How can i check again over this function during my application lifecycle ? Do I need to attach every time a new menu to relaunch this check ?