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

makeKeyAndOrderFront not working


  • Subject: makeKeyAndOrderFront not working
  • From: Daniel Child <email@hidden>
  • Date: Thu, 08 Dec 2005 19:25:38 -1000

Hi,

I am having trouble getting a window to become the frontmost window on startup.

In appController.h I declare a window.

IBOutlet NSWindow *centerWindow;

I connect the controller "cube" instance to the window to be opened, connecting the "centerWindow" outlet that is available after reading files. But when the application starts up, the window does not appear in front of previously opened apps. (This is a menu-free app, by the way, but I don't think that should matter.)

I thought that if you instantiate the controller within Interface Builder, then it will be "ready to use" when the application awakens the nib. My code is quite basic:

- (void)awakeFromNib
{
[centerWindow makeKeyAndOrderFront:nil];
}
@end

....to no avail. I'm missing something terribly basic but still can't find it. I thought that maybe I have to explicitly call awakeFromNib, but then read it is called automatically. What's missing?

Thanks,
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: makeKeyAndOrderFront not working
      • From: Andreas Mayer <email@hidden>
    • Re: makeKeyAndOrderFront not working
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: Re: creating an app w/o MainMenu.nib
  • Next by Date: Re: makeKeyAndOrderFront not working
  • Previous by thread: Re: NSToolbar wierdness
  • Next by thread: Re: makeKeyAndOrderFront not working
  • Index(es):
    • Date
    • Thread