Re: -[NSResponder flagsChanged:] not called?
Re: -[NSResponder flagsChanged:] not called?
- Subject: Re: -[NSResponder flagsChanged:] not called?
- From: Matt Neuburg <email@hidden>
- Date: Wed, 12 Jun 2002 14:57:17 -0700
At 9:14 PM +0200 6/12/02, Marco Scheurer wrote:
>
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.
>
...
>
ask you to RTFM, or at least to doubt and ask yourself if your
>
experiment was correct before making such statements
I do indeed doubt my experiment was correct; that's why I asked you to show
me what was wrong with it. However, since you haven't done so, I must
continue to think my suggestion was a good one and an appropriate one. Here
are my reasons for thinking this:
First, let's read Garfinkel and Mahoney, p. 263: "Subclassing NSWindow is a
common technique for intercepting all of the events that are destined for a
window...". So - common technique, or almost always bad idea?
Next, let's try *your* suggestion. Do you remember what it was? Here it is:
>
>Ahem. A NSWindow subclass is certainly not needed for that, a window
>
>delegate will certainly catch these events if no one is doing this
Well, I guess I think *you* should RTFM or at least doubt, etc., since
neither my reading of the docs nor my experiments confirm this claim.
>
As Harold found out:
>
> All I had to do was add
>
> - (BOOL)acceptsFirstResponder
But what helped Harold was *not* your original claim that the window
delegate will get a flagsChanged call! That claim isn't helping me, either,
because I can't get it to work. So I think subclassing NSWindow can be a
fine idea, and I intend to continue using it. And I will even dare to
suggest to others that they use it, when appropriate.
At the same time, I am anxious to learn. So please, if you know something,
teach me! And the way to do this, as I said before, is to send me a project
proving that in general the window delegate (qua window delegate, not qua
responder or something like that) gets a flagsChanged call. I will be most
grateful. Unlike some, I like being wrong; it's one of the ways I learn. m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
The road to wisdom? Well, it's plain / and easy to express:
Just err and err and err again / but less and less and less.
_______________________________________________
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.