tags:

views:

21

answers:

1

Hello, I've got a small Cocoa problem. I have a StatusBar application that has an NSStatusItem in the Menu Bar. It is drawn by a custom View as shown here. When the Main view of the app is hidden (most of the time), the computer goes to sleep and awakens again, I lose the icon and a blue rectangle is shown. Has anyone of you got any idea what I can do about it. It doesn't happen when the Main View is shown.

A: 

The problem was fixed by replacing [theItem drawStatusBarBackgroundInRect:[toolbarView frame]] to [toolbarView setNeedsDisplay:YES]; Thanks AlBlue for getting me in the right direction.

bartvdpoel