discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOpenGLView subclass as a first responder


From: Ivan Vučica
Subject: NSOpenGLView subclass as a first responder
Date: Mon, 25 Jun 2012 02:24:48 +0200

Hi!

QuartzCore demos currently use a NSOpenGLView subclass to display
their content. It's set as window's contentView. They all have main
menu, but only one of them (currently) adds additional items that call
methods such as -animation1:, animation2:, etc. These methods are
implemented inside the NSOpenGLView.

Under Cocoa, in this demo, "hello_animation", I've simply overridden
-acceptsFirstResponder to return YES. This is enough for Cocoa itself
to turn this view into a first responder, so that menu items become
enabled.

Under GNUstep, even a call to -becomeFirstResponder doesn't seem to
turn it into a first responder (at least as far as menu items are
concerned). Even a delayed call to -becomeFirstResponder (using
-performSelector:withObject:afterDelay:) didn't help.

A click on the view does enable the menu items.

Any ideas on what is going on and what can be done to make this view a
first responder? (One of the things I could do is simply change target
for these items, but that still doesn't fix the incorrect behavior
I've seen with regard to first responder, so I'm not counting that as
a solution to this bug.)
-- 
Ivan Vučica - ivan@vucica.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]