Re: Injecting an NSResponder into the responder chain [solved]
Re: Injecting an NSResponder into the responder chain [solved]
- Subject: Re: Injecting an NSResponder into the responder chain [solved]
- From: Glen Low <email@hidden>
- Date: Wed, 5 May 2004 10:30:57 +0800
Fritz:
On 01/05/2004, at 5:41 AM, Fritz Anderson wrote:
On 30 Apr 2004, at 4:01 AM, Glen Low wrote:
I want to handle the changeFont: message from NSFontPanel, or a
custom message set using setAction:.
Now I do not use any custom NSView objects (or those that are custom
don't want to bother with handling changeFont:) in the hierarchies,
(Actually the message is from NSFontManager...)
This is a pity, as it would seem that the handling of changeFont:
would be a view-specific behavior, and the most straightforward way to
add a view-specific behavior is to subclass the view and implement
changeFont: there.
Ugly. Which is why, knowing as little about your situation as I do,
I'd prefer to subclass the views.
I finally decided to adopt a position in between yours and my original,
instead of dicking around with finicky responder chains -- I realize
that responder chains really have to reflect the visible reality of
views and superviews, otherwise some counter-intuitive behavior can
result.
So, I've subclassed NSTableView specifically to handle changeFont: and
changeColor:, but since my original worry about behavior too specific
to particular views still holds, my PGFontColorTableView merely
forwards these messages to its delegate for handling.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.