+@implementation wxNSPanel
+
+- (void)setImplementation: (wxNonOwnedWindowCocoaImpl *) theImplementation
+{
+ impl = theImplementation;
+}
+
+- (BOOL)canBecomeKeyWindow
+{
+ return YES;
+}
+
+- (wxNonOwnedWindowCocoaImpl*) implementation
+{
+ return impl;
+}
+
+- (void)doCommandBySelector:(SEL)selector
+{
+ if (shouldHandleSelector(selector))
+ [super doCommandBySelector:selector];
+}
+
+// NB: if we don't do this, it seems that all events that end here lead to a NSBeep
+- (void)noResponderFor: (SEL) selector
+{
+ if (selector != @selector(keyDown:) && selector != @selector(keyUp:))
+ {
+ [super noResponderFor:selector];
+// wxOSX_NoResponderHandlerPtr superimpl = (wxOSX_NoResponderHandlerPtr) [[self superclass] instanceMethodForSelector:@selector(noResponderFor:)];
+// superimpl(self, @selector(noResponderFor:), selector);
+ }
+}