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: David Ayers
Subject: Re: [semi-PATCH] menu title bar sizing & menu close button
Date: Wed, 19 Mar 2003 17:22:52 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210

Fred Kiefer wrote:

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?


Benhur Stein wrote:

I just made some tests in OPENSTEP 4.2.
It works in a way similar to GNUstep (or the ather way around),
NSMatrix calls setShowsFirstResponder: each time it draws a cell,
and if the cell is the key cell, it calls again with NO after
having drawn it.
I also made a subclass of cell call setShowsFirstResponder:YES before
calling super in drawWithFrame:, and all cells in the matrix appeared
with the dotted line. So, it seems that in OS4.2 setShowsFirstResponder:
is used to tell the cell to display the dotted line or not. The documentation is not clear, and it is possible that in MacOSX it
works differently.

I was thinking about removing all those calls and only put them in
a method to change the keyCell and in become/resignFirstResponder in
NSMatrix. Can anybody see any inconvenient for this?

Benhur

Hi Fred,
Hi Benhur

I'm too deep into GDL2 (when I find the time) and away from the GUI and I haven't been following closely enough to make an educated comment, but I'm wondering whether the dotted line shows which cell is key rather than which cell is selected. (i.e. a keyboard navigation issue.)

Then "setShowsFirstResponder:/showsFirstResponder:" just seem to be convienence methods to provide a default behavior in the drawing code for adorning the cell which is "key".

In that case showsFirstResponder would just be "persistent" attriibute (flag) which should be evaluated *only* if the control is firstResponder and the cell is key. But as Ben's test suggest, OS4.2 uses it to decide on whether to draw the dotted lines independent of whether the cell is key or not... Hmm. how does a cell know it is key again ?.... as it doesn't declare becomeFirstResponder... it's been too long sorry, but maybe my babeling will help in the puzzle anyway :-).

Cheers,
Dave







reply via email to

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