bug-gnustep
[Top][All Lists]
Advanced

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

Re: [PATCH] Proposal to fix NSCell issue


From: Quentin Mathé
Subject: Re: [PATCH] Proposal to fix NSCell issue
Date: Thu, 18 Mar 2004 21:14:04 +0100

Le 18 mars 04, à 02:11, Fred Kiefer a écrit :

Quentin Mathé wrote:

In the current situation NSCell performClick: method doesn't work with NSMatrix and cannot be used for an NSCell subclass with embedded cells. Here is a screenshot for the issue with NSMatrix when you call performClick: on a cell :
… before the performClick: call
http://www.quentinmathe.com/gnustep/work/matrix_before_click.jpg
After the performClick: call
http://www.quentinmathe.com/gnustep/work/matrix_after_click.jpg
To fix this issue, I'm proposing the patches set below. The idea is to have an NSControl method which can return the frame for the cell passed as a parameter, and to have also a such method for NSCell in order to allow NSCell subclasses to embed other cells (like in NSComboBoxCell which I'm currently trying to rewrite).
Then the situation will be :
Each NSControl knows which is the frame for its cells...
Similarly at the cell level, each NSCell knows which is the frame (relative to the control view) for its subcells. To implement this proposal, I have created a protocol GSCellContainer with one method -frameForCell: which is implemented by NSControl and NSCell class, and this NSCell class implements a method -container which returns the container for itself : the container can be a cell or a control (when supercell ivar is nil).

This sounds interesting, but what about implementing it with a set of methods more similar to the one from NSPopupButtonCell: -performClickWithFrame:inView: I don't mean the actual implementation there, rather the interface. If we implement this method already in NSCell we should have a nice starting point for the experiments needed to find the best way to implement the functionality needed for NSComboBoxCell and the matrix interaction. It would for example work nicely together with the -frameForCell: method suggested by Quentin.

Well, why not… but it looks more like an implementation detail than a new proposal; right ?

Quentin.

--
Quentin Mathé
qmathe@club-internet.fr




reply via email to

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