I would like to have a progress bar in a secondary window that stays active just like a NSAlert window. I especially like how it plays a sound when the user tries to click off of it.
I figured out how to force the window to stay active by invoking:
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(windowChange:)
name: NSWindowDidBecomeKeyNotification
object: nil];
and then in the notification method I do:
-(void) windowChange:(NSNotification*) notification {
NSWindow *window = [notification object];
if (window == myMainWindow) {
[myProgressWindow makeKeyAndOrderFront:nil];
}
}
This doesn't do everything I'd like. Mostly I want to stop the user from pressing anything on my main window and to keep my progress bar window active/front.
-GW