I\'m building a menu bar in my cocoa application with the following code in the @implementation
of my custom application CustomApplication
:
<
Okay, thanks to the remarks of @bhaller I was able to solve my problem.
I actually transferred my calls to the delegate as follows.
-(void)applicationWillFinishLaunching:(NSNotification *)aNotification
{
[CustomApplication sharedApplication];
[CustomApplication setUpMenuBar];
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
}
-(void)applicationDidFinishLaunching:(NSNotification *)notification
{
[CustomApplication sharedApplication];
[NSApp activateIgnoringOtherApps:YES];
}