This maybe a cocoa group question: But I thought I'd try here first.
I've been learning cocoa for a while - but lack experience. So
pointers to clear docs would be appreciated.
I've have a QC comp in a subclassed NSWindow that has gone full size
using the method described at cocoadevcentral http://
cocoadevcentral.com/articles/000028.php
I want to use the 'escape' key to exit full screen mode, but I am
finding that the 'forward all events' option set on the QCView in IB
is interrupting the events from the NSWindow. ie. When I disable
'forward all events', I can successfully detect keyDown events from
the full-screen NSWindow subclass.
(1) How do I detect this keyboard command when 'forward all events'
is enabled?
I reckon I could work-around my keyboard events problem by triggering
a method by a keyboard press in the QC composition.
I have tried publishing the output of the keyboard patch (not the
'escape' key but 'tab'), and listening for the event in my
AppController.
- (BOOL) canBecomeKeyWindow
{
return YES;
}
is set on the subclassed window.
(2) How should I do this 'listening'? Is there any sample code
illustrating how to set up Key-value observation on a published
output of a QC patch?
I've googled and searched the group, but no immediate joy.
2007-01-29 19:40:30.163 QCWii[6390] An instance 0x35cb60 of class
QCView is being deallocated while key value observers are still
registered with it. Break on _NSKVODeallocateLog to start debugging.
In what method do I remove the observer (before the application quits)?
Sorry if these are basic questions.
Thanks,
Ian Grant
*******************************
Ian Grant
Lecturer in Digital Art
Faculty of the Arts
Thames Valley University
Ealing, UK
W5 5DX
<email@hidden>
*******************************