• 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
Re: Re: Open window from nib in foreground
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Open window from nib in foreground


  • Subject: Re: Re: Open window from nib in foreground
  • From: email@hidden
  • Date: Fri, 20 Feb 2009 15:07:10 +0000

OK, that worked great! I implemented -awakeFromNib in the first responder class:

- (void)awakeFromNib
{
[sessionWindow makeKeyAndOrderFront: self];
}

and that did the trick. Next problem: sometimes when I do NSAlert sheets the NSAlert does not have focus. I am closing a sheet that was previously open, and then bringing up the alert. For example:

// Close the progress sheet
[progressSheet orderOut:self];
[[NSApplication sharedApplication] endSheet:progressSheet];

// Open the alert sheet
NSBeginInformationalAlertSheet(fileName, @"OK", nil, nil, sessionWindow,
nil, nil, nil, nil,
@"The transfer completed successfully.");

The alert sheet comes up, but I can tell it doesn't have focus because the "OK" button doesn't pulse until I have clicked inside the sheet once. Any ideas?

Leo

On Feb 19, 2009 3:07pm, Alexander Spohr <email@hidden> wrote:
Oh, did you try awakeFromNib?



atze



Am 19.02.2009 um 19:31 schrieb Leo Singer:




On Thu, Feb 19, 2009 at 1:21 PM, Alexander Spohr email@hidden> wrote:




Otherwise you could call makeKeyAndOrderFront right after you load the nib.




How do I do this, though? The method that loads the NIB knows nothing

of the window's existence, because -loadNibNamed just returns a bool.



Leo




_______________________________________________

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


  • Prev by Date: Re: performance of UIControls
  • Next by Date: Re: performance of UIControls
  • Previous by thread: Re: Open window from nib in foreground
  • Next by thread: Bumpy NSViewAnimation
  • Index(es):
    • Date
    • Thread