On 2014 Aug 27, at 09:05, Ken Thomases <k...@codeweavers.com> wrote:

> And is the view the first responder?  Does it return YES from 
> -acceptsFirstResponder?

It doesn’t seem to matter.  To answer your question, I put this code into my 
view controller:

#if ACCEPT
- (BOOL)acceptsFirstResponder {
    return YES ;
}
#endif

-(void)keyDown:(NSEvent *)event {
    NSLog(@">> %s", __PRETTY_FUNCTION__) ;
}

-(void)mouseDown:(NSEvent *)event {
    NSLog(@">> %s", __PRETTY_FUNCTION__) ;
    NSLog(@"acceptsFirstResponder = %hhd", [self acceptsFirstResponder]) ;
}

RESULTS:

If I switch out the #if ACCEPT
-  Mouse click logs, says that acceptsFirstResponder is 0
-  Key press results only in system alert sound :(

If I switch in the #if ACCEPT
-  Mouse click logs, says that acceptsFirstResponder is 1
-  Key press results only in system alert sound :(


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to