[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SystemPreferences.app-panels not in action responder chain
From: |
Ingolf Jandt |
Subject: |
SystemPreferences.app-panels not in action responder chain |
Date: |
Sat, 16 Sep 2006 13:16:46 +0200 |
I have written a simple NSPreferercePane (heir) for SystemPreferences.app to
set the Font defaults. The problem: The pane does not by default recieve the
font manager's changeFont: action message, and I have the strong feeling that
it should.
I have inserted [NSApp setDelegate: self] to get my class into the action
responder chain and to test the rest of my code. Everything works fine then,
but this is obviously not the right way.
Should the NSPreferencePane class be changed? Or must I send addNextResponder
to some object (which)? Or can I have missed some trivial step?
As I said the panel is finished except of this detail, and I will send in the
code for review (commit if appropriate) as soon as this issue is solved.
Ingolf
code snippet for illustration:
@implementation FontModule : NSPreferencePane
...
- (void) setButtonAction: (id)sender
{
NSFontManager *fontMgr=[NSFontManager sharedFontManager];
[fontMgr setSelectedFont: [previewTextField font]isMultiple:NO];
[fontMgr orderFrontFontPanel: self];
}
- (void) changeFont: (id) sender
{
NSLog(@"changeFont: entered ..."); /*never reached without the [NSApp
setDelegate: self] hack*/
...
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
- SystemPreferences.app-panels not in action responder chain,
Ingolf Jandt <=