Re: displaying window on activation
Re: displaying window on activation
- Subject: Re: displaying window on activation
- From: Allan Odgaard <email@hidden>
- Date: Sun, 3 Oct 2004 11:00:06 +0200
On 1. Oct 2004, at 21:43, Chuck Soper wrote:
I'm trying to figure out how to make a window key and ordered front
when receiving a NSApplicationDidBecomeActiveNotification (kind of
like the BBEdit8 demo in functionality). The window is a demo dialog
instantiated from an NSWindowController in its own nib. [...]
[demoWindow center];
[demoWindow makeKeyAndOrderFront:nil];
[demoController showWindow:nil];
NSWindow * mainWindow = [NSApp mainWindow];
if (mainWindow != nil) {
int windowNumber = [demoWindow windowNumber];
[mainWindow orderWindow:NSWindowBelow relativeTo:windowNumber];
}
Try to remove all these lines, as the runModalForWindow: method will
center, bring to front, set level to dialog (so it floats above other
windows) etc.
Probably it doesn't work because the window is already on screen when
you call it.
--
http://macromates.com/ ::: TextMate, OS X text editor
http://macromates.com/sigpipe/ ::: Personal weblog about
programming
_______________________________________________
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