• 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 with makeKeyAndOrderFront
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue with makeKeyAndOrderFront


  • Subject: Issue with makeKeyAndOrderFront
  • From: anni saini <email@hidden>
  • Date: Mon, 11 Mar 2013 16:15:06 +0800 (SGT)

Hi,

My app is just having NSStatusBar menu such as Adium. On right click context menu, I'm calling some window to open.

//Calling method
myWindow = [[MyWindowViewController alloc]init];
myWindow.data = @"abc";
[myWindow show:self];

//Called method
- (void)show:(NSWindow*)parentWindow
{
   [myPanel centre];

   [myPanel setFloatingPanel:YES];

   [myPanel makeKeyAndOrderFront:nil];

}

Observations:
1. When app doesn't have any window open. myPanel doesn't open until I open any window of my app.
2. When app have some window open but its in background, myPanel doesn't open until I click on any window of my app to make it front window.
3. When I tried to debug the issue, window gets open each time if I set break point in this method.
4. If I use [NSApp activateIgnoringOtherApps:YES]; before makeKeyAndOrderFront method, myPanel is working as expected.

Please let me know whats wrong with the above code or how can i make it better?

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 with makeKeyAndOrderFront
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Dragging NSManagedObject subclass within app
  • Next by Date: UITableView disabled scrolling Cell selection
  • Previous by thread: Re: Dragging NSManagedObject subclass within app
  • Next by thread: Re: Issue with makeKeyAndOrderFront
  • Index(es):
    • Date
    • Thread