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: Christopher Armstrong
Subject: Re: SystemPreferences.app-panels not in action responder chain
Date: 16 Sep 2006 20:37:52 -0700
User-agent: G2/1.0

Sounds like a window focusing issue. Not that I know much about the way
the X backend works, but perhaps KDE is not giving the font panel focus
(or is giving the Font sub-menu focus)? Maybe requests to give the font
panel focus are overriden or ignored, either by something in our own
code or something that KDE's window manage is doing?

Cheers
Christopher Armstrong

Fred Kiefer wrote:
> Ingolf Jandt schrieb:
> > 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*/
> > ...
>
> This font menu problem is something I noticed myself even with normal
> applications like Ink. What happens is that the font menu takes focus
> and then the changeFont: action is send down the first responder chain
> to the font menu itself. No idea why this happens. It also depends on
> the window manager in use. It did not happen to me on KDE until early
> this year, when it change for unclear reasons.
>
> I will need to investigate this in detail at some time.
> 
> Cheers
> Fred



reply via email to

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