Problem receiving key events in CLI created window
Problem receiving key events in CLI created window
- Subject: Problem receiving key events in CLI created window
- From: Pete French <email@hidden>
- Date: Thu, 17 Jul 2003 13:40:05 +0100
O.K., I have a very frustrating problem with a piece of long
standing code which has stopped working on the latest version
of OSX. The code worked fine on the public beta (last version I
had before Jaguar) and also on Rhapsody and OpenStep before that.
Which is kind of frustrating.
I have acommandline program which, when run, opens a window and draws into
it. It also receives events in that window using this:
event = [NSApp nextEventMatchingMask:NSAnyEventMask
untilDate:the_past inMode:NSDefaultRunLoopMode dequeue:YES];
where 'the_past' is set to [NSDate distantPast] so that the call returns
immediately. For key events I process them myself, all other events are
then passed on using [NSApp sendEvent:event];
When I run the program I find that key events are still captured by the
terminal! Even with the window key and to the front, if I type then
the keypresses appear in the shell window the application is running from.
I am completely at a loss as to how to fix this, or what has changed to make
this suddenly stop working after five years!
All suggestions are very welcome...
-bat.
_______________________________________________
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.