bug-gnustep
[Top][All Lists]
Advanced

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

Re: [semi-PATCH] menu title bar sizing & menu close button


From: Fred Kiefer
Subject: Re: [semi-PATCH] menu title bar sizing & menu close button
Date: Tue, 18 Mar 2003 22:50:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903

Benhur Stein wrote:
Citando Fred Kiefer <FredKiefer@gmx.de>:
There are also a lot of problems with setShowsFirstResponder:. I think
from the documentation that this only indicates that the dotted line
will be drawn, when the cells also becomes first responder. But our
current code treats this as unconditional, the value itself determines
if the dots get drawn. This value is screwed up by the current code in
NSButton, whenever the button becomes first responder. And even worse in
NSMatrix. I would like to change this, so that the redraw code of NSCell
takes over the processing of showsFirstResponder (drawing the dotted
frame whenever the control is the first responder and the cell is the
selected cell of the responder) and just selecting the cell everywhere
else. Is this solution fine for everybody?

Well, I don't agree with this change. It would break object encapsulation.
IMHO, it should be the control that makes the decision of which cell should
show first responder status, not the cell. For example, with NSMatrix,
it is keyCell, not selectedCell (the code in NSMatrix is wrong) that
should be dotted. A different control could have another way to choose its
first responder cell.

This is an interesting point you are making. I did not know, that for NSMatrix the key cell should be the first responder, but than yes, when you think about it it is obvious.

My underlying question is what the showsFirstResponder method is used for. Will it be just be called internally for the cell of the first responder to switch on the dotted frame, as it is now used in the GNUstep code or should it, as the documentation seems to imply be used to switch on and off the behaviour of showing the dotted line, when becoming first responder?

Perhaps somebody with a MacOSX could check if the way I do understand the documentation is correct. If not than only the two new methods on NSControl (becomeFirstResponder and resignFirstResponder) and thedrawInteriorWithFrame:inView: method on NSButtonCell and NSPopupButtonCell must be adopted. Otherwise all the drawing of cells will need reviewing.








reply via email to

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