• 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
Modal window is not made key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modal window is not made key


  • Subject: Modal window is not made key
  • From: Michael Becker <email@hidden>
  • Date: Fri, 9 Apr 2004 18:32:51 +0200

Hi.

Thanks for the hints at applicationDidFinishLaunching, works perfectly! (I _knew_ there where a lot of these delegate methods, but I really didn't know in which order they're all called, next time I'll RTFM more thoroughly)

However, I quickly ran into the next problem. 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.


  • Prev by Date: Re: Passing C Style Function Callbacks in Cocoa
  • Next by Date: Crash in [[NSString alloc] initWithCString:msg]
  • Previous by thread: Re: Setting NSTextView to not wrap text?
  • Next by thread: Re: Modal window is not made key
  • Index(es):
    • Date
    • Thread