My app has NSStatusBarButton on status bar (where the time, wifi etc)
The user can tap to show/hide the app.
to hide :
[[NSApplication sharedApplication] hide:self];
[[NSApplication sharedApplication] deactivate];
to show :
[self.windowController.window makeKeyAndOrderFront:self];
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
The problem is when I show the app, the window buttons (close, maximise ) are flickering their colour, then turn gray. I can see in logs of events the application is active and it responds to mouse scroll.
Only if I activate OTHER app with the mouse and return back to my app, the buttons will be active with there colour (red and green)
More info :
1. the app is created in code (not storyboard) besided the mainMenu.xib.
2. when I tap the image menu status bar to UNHIDE the app, in debug mode=on, the code is break with this error :
"error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x4e47432b2b00). The process has been returned to the state before expression evaluation."
Any ideas where to continue from here ?