• 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
Animated NSWindow sheets on launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Xcode, Cocoa application project, AppleScript
  • Next by Date: Re: Getting bound UI elements to update during a loop
  • Previous by thread: Re: Xcode, Cocoa application project, AppleScript
  • Next by thread: [Moderator] Cocoa and list resources
  • Index(es):
    • Date
    • Thread