• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -[NSResponder flagsChanged:] not called?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSResponder flagsChanged:] not called?


  • Subject: Re: -[NSResponder flagsChanged:] not called?
  • From: Marco Scheurer <email@hidden>
  • Date: Wed, 12 Jun 2002 18:23:21 +0200

On Wednesday, June 12, 2002, at 05:56 pm, Matt Neuburg wrote:
On Tue, 11 Jun 2002 16:38:54 -0600 (MDT), Harold Cooper
<email@hidden> said:

I've implemented the flagsChanged: message of NSResponder as
follows in my NSView subclass:

- (void)flagsChanged:(NSEvent *)event
{
NSLog(@"flagsChanged:");
//...
}

of course nothing is printed, nor is the omitted portion executed.

Harold - flagsChanged works perfectly in my app. I suspect that your
problem is that flagsChanged doesn't happen "in" any view, so you need to
catch it in your NSWindow subclass; that's what I do, anyway. m.

Ahem. A NSWindow subclass is certainly not needed for that, a window delegate will certainly catch these events if no one is doing this before.

But in order to catch these events directly in your view, all you have to do is to make sure that, like for other keyboard events, it is first responder or in the responder chain.

Marco Scheurer
Sen:te, Lausanne, Switzerland http://www.sente.ch
_______________________________________________
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.

  • Follow-Ups:
    • Re: -[NSResponder flagsChanged:] not called?
      • From: Matt Neuburg <email@hidden>
References: 
 >Re: -[NSResponder flagsChanged:] not called? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: CFStringTrimWhitespace and NSMutableString
  • Next by Date: Re: Forwarding key events to a non first responder?
  • Previous by thread: Re: -[NSResponder flagsChanged:] not called?
  • Next by thread: Re: -[NSResponder flagsChanged:] not called?
  • Index(es):
    • Date
    • Thread