1

I am working on an Mac Application. I have set Application is agent (UIElement) = YES in plist, and App have a Window (lets say Popup Window) that acts as custom PopOver for StatusMenu. One more window is there (lets say Window B) that should opened on selecting a Link from StatusMenu that i have made, but Problems that I am facing are as follow:

  • On Application launch, When I opens status Menu It also showing Window B, that actually should not be Shown. Window B is allocated and initialised in Application Delegate.

  • Another Issue is When Window B is made Visible by Selecting it from StatusMenu. It appears well, Now i switch to another application so Its window is sent to background that is fine, but Whenever I click on Status Menu, It automatically comes in Front. Ideally It should only open Popup window.

Mrug
  • 4,963
  • 2
  • 31
  • 53

1 Answers1

2
  • Window B is opening because you might be forgot to un-check "Visible At Launch" window property in attribute inspector of interface builder

enter image description here

  • 2nd issue you can resolve by activateIgnoringOtherApps set to YES before calling your window

    [[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
    
    [windowB showWindow:nil];
    
MD SHAHIDUL ISLAM
  • 14,325
  • 6
  • 82
  • 89
Anni S
  • 1,996
  • 19
  • 28