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 <a...@freeport.de> 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 a...@freeport.de> 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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com