Hi, I was facing issue of NSStatusBar getting closed by the [window close].
In our application, we have used [NSStatusBar SystemStatusBar] to display menu. In a particular scenario, I need to close all the windows of my application except About and Login, so I wrote following function: - (void)closeIrrelevantWindows { NSSArray *allWindows = [NSApp windows]; for(NSWindow *aWindow in allWindows) { if([awindow isVisible] && ![aWindow aboutWin] && ![aWindow loginWindow]) [aWindow close]; } } This call some times closes my NSStatusItem as well. Can anybody tell me whats wrong with the above code? I checked NSStatusItem and NSStatusBar class reference both are derived from NSObject. Thanks. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com