Re-Post: Modal window is not made key
Re-Post: Modal window is not made key
- Subject: Re-Post: Modal window is not made key
- From: Michael Becker <email@hidden>
- Date: Mon, 12 Apr 2004 21:44:03 +0200
Hi.
While my application loads data from a server, I want to display a
modal window, informing the user that the program is downloading
something from the internet. This is my code:
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification {
NSModalSession session = [NSApp
beginModalSessionForWindow:oWindowServer];
[ oWindowServerProgress setIndeterminate:YES];
[ oWindowServerProgress startAnimation:self];
// Here I am loading the data
[[ orderManager orderObject] getData];
[NSApp endModalSession:session];
[ oWindowServerProgress stopAnimation:self];
[ oWindowServer close];
}
The window (oWindowServer) is displayed but _NOT_ made key. The docs
tell me not to invoke makeKeyAndOrderFront:, though. Furthermore, the
progress indicator is neither indeterminate nor animated. The code
(getData) is processed, though.
What am I doing wrong?
Another question: In the window there's no button or any way for the
user to close it. It will only be closed when the load is complete. Is
this a reasonable behavior? What could happen in the worst case?
Kind regards,
Michael
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.