NSWindow behavior from a terminal App
NSWindow behavior from a terminal App
- Subject: NSWindow behavior from a terminal App
- From: Thierry Faucounau <email@hidden>
- Date: Wed, 12 Sep 2001 18:52:58 -0600
Hi,
I have a command line application (run from Terminal) which creates new,
separate NSWindows. Early on in my CLI program I have the Following:
/* create the global Cocoa objects we need for this tool */
pool = [[NSAutoreleasePool alloc] init];
app = [NSApplication sharedApplication];
/* stop that dock bouncing */
[app finishLaunching];
( Found that last one in the NSApplication header file. without it the
dock icon bounces for quite a while)
Then I periodically let the NSRunLoop go with the following code:
/* run one iteration of the cocoa run loop */
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
beforeDate:[NSDate distantPast]];
This all seems to work fine and I can create all the windows I want and
draw into them with both Quartz and OpenGL (which is very cool).
However, the windows themselves will never gain focus (come to the
front) although I can move them around with the title bar.
The traffic light buttons never light up so you can never
close/grow/minimize the windows.
The resize area at the bottom right of the window is also not responding
(but I can resize them programmatically).
Anyway, I'm sure I'm missing something here, any and all help would be
greatly appreciated.
--
Thierry Faucounau
Research Systems, Inc.