Re: -[NSResponder flagsChanged:] not called?
Re: -[NSResponder flagsChanged:] not called?
- Subject: Re: -[NSResponder flagsChanged:] not called?
- From: Marco Scheurer <email@hidden>
- Date: Wed, 12 Jun 2002 21:14:25 +0200
On Wednesday, June 12, 2002, at 08:03 pm, Matt Neuburg wrote:
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.
Ahem yourself. Have you tested what you're saying? I have, and in my
tests,
the firstResponder or window delegate does not catch this event; the
window
subclass does. That is why I gave the response that I did.
What a tactful answer. Yes I did test what I'm saying, and the fact that
your test did not work only proves that there was something wrong with
your test.
I said "ahem" because you offered terribly bad advice. Subclassing
NSWindow is almost always a bad idea, and *certainly* was not the
solution in that case.
Of course, if you have a project that proves otherwise, please send it
to
me. I'd be happy to learn what I'm "certainly" doing wrong. m.
Nothing less. I'm not going to send you anything like that, but instead
ask you to RTFM, or at least to doubt and ask yourself if your
experiment was correct before making such statements. As Harold found
out:
All I had to do was add
- (BOOL)acceptsFirstResponder
{
return(YES);
}
to my NSView subclass and everything magically worked.
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.