• 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: Injecting an NSResponder into the responder chain [solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: NSStrings for NSURL URLWithString
  • Next by Date: Re: NSStrings for NSURL URLWithString
  • Previous by thread: Re: SOLVED: The position of the insertion point in an NSTextView?
  • Next by thread: ANN: New Binary Installers for GSWeb and GDL2
  • Index(es):
    • Date
    • Thread