discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SystemPreferences.app-panels not in action responder chain


From: Enrico Sersale
Subject: Re: SystemPreferences.app-panels not in action responder chain
Date: Sat, 16 Sep 2006 15:08:50 +0300

On 2006-09-16 14:16:46 +0300 Ingolf Jandt <i.jandt@web.de> wrote:

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'd try to put [[NSFontManager sharedFontManager] setDelegate: self] in the 
-didSelect method of your panel. (But perhaps I'm wrong...)

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



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep







reply via email to

[Prev in Thread] Current Thread [Next in Thread]