Animated NSWindow sheets on launch
Animated NSWindow sheets on launch
- Subject: Animated NSWindow sheets on launch
- From: Roberto Arias <email@hidden>
- Date: Thu, 14 Apr 2005 16:11:39 +0100
Im trying to display a login/passwd sheet (animated), after my main
window is loaded.
This is the code used to load the login nib and display it (took it
from Apple Documentation ;-)
if (!login_panel) {
[NSBundle loadNibNamed: @"login.nib" owner:self];
}
[NSApp beginSheet: login_panel
modalForWindow: [NSApp mainWindow]
modalDelegate: nil
didEndSelector: nil
contextInfo: nil];
[NSApp runModalForWindow: login_panel];
[NSApp endSheet: login_panel];
[login_panel orderOut: self];
It worked well when I tested it with a button (I pressed the button ->
the sheet showed up... animated). However, when I moved the code to
the delegate method (from NSApplication):
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
The sheet pops up in a non-animated fashion.
I tried the delegate from NSWindow:
- (NSRect)window:(NSWindow *)window willPositionSheet:(NSWindow
*)sheet usingRect:(NSRect)rect
But again, the sheet just comes animated when I use the test button,
and not when I launch the application. Does anyone know how to work
around this?
_______________________________________________
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