• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Issue of NSStatusBar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue of NSStatusBar


  • Subject: Issue of NSStatusBar
  • From: Anil Saini <email@hidden>
  • Date: Tue, 26 Feb 2013 21:16:03 +0400

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Issue of NSStatusBar
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: NSButton in NSToolbarItem does not use "small size"
  • Next by Date: Re: Issue of NSStatusBar
  • Previous by thread: Identifying monitor configurations
  • Next by thread: Re: Issue of NSStatusBar
  • Index(es):
    • Date
    • Thread