• 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
Another Cocoa Bug!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another Cocoa Bug!!


  • Subject: Another Cocoa Bug!!
  • From: Steve Gehrman <email@hidden>
  • Date: Tue, 28 Aug 2001 18:13:18 -0700

Everytime I add a new feature to my, I spend hours trying to fix the side effects caused by Cocoa bugs.... ARRRGGGGG!!

Here's another one....

I'm adding an NSStatusBar to the menu bar with the following code

NSStatusBar *statusBar = [NSStatusBar systemStatusBar];

_statusItem = [[statusBar statusItemWithLength:NSVariableStatusItemLength] retain];
[_statusItem setTitle:@"menu"];
[_statusItem setMenu:[[[NSMenu alloc] init] autorelease]];

[self rebuildMenu];

This works great. But it has an annoying side effect. In my app delegate I implement applicationShouldHandleReopen. When the NSStatusBar is set, the flag sent to this routine is always true (which means that there are visible windows) even when there are no visible windows. When I turn off the NSStatusBar, this works normally.

- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag;
{
if (!flag)
[[FileWindowController alloc] init];

return NO;
}

Is this fixed in 10.1?

steve


  • Prev by Date: NSTableView editing delay
  • Next by Date: Sorting an NSArray containing NSDictionaries
  • Previous by thread: NSTableView editing delay
  • Next by thread: Sorting an NSArray containing NSDictionaries
  • Index(es):
    • Date
    • Thread