discuss-gnustep
[Top][All Lists]
Advanced

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

NSWindow fix


From: Andreas Höschler
Subject: NSWindow fix
Date: Thu, 30 Aug 2007 12:24:25 +0200

Hi all,

I believe I have posted this already a few weeks ago, but I could also be wrong. I just fall again over a little issue in NSWindow makeFirstResponder.

- (BOOL)makeFirstResponder:(NSResponder *)aResponder
{
  ...
  _firstResponder = aResponder;
  if (_firstResponder)  // <------------------- add this check
    {
     if (![_firstResponder becomeFirstResponder])
       {
        _firstResponder = self;
        [_firstResponder becomeFirstResponder];
        return NO;
       }
    }

  return YES;
}

Since I didn't remember what exactly the "if (_firstResponder)" check was good for I tried to get lucky without it after downlöoading latest trunk. But this one is really important as I have learned again just now. Otherwise makeFirstResponder returns a wrong value if

        [window makeFirstResponder:nil];

is called. If nothing speaks against this modification please apply it to trunk.

Thanks,

  Andreas





reply via email to

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