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: Alexander Malmberg
Subject: Re: [PATCH] Proposal to fix NSCell issue
Date: Sat, 20 Mar 2004 02:57:22 +0100

When working with cells and views, it's important to remember that the
connections between cells and views are not simple. :)

In particular, a single cell might be shared by multiple views, so a
cell does not have any defined "control view" (except when it's inside a
-...inView: call, and even then there are some interesting reentrancy
issues). Thus, adding a new supercell ivar is almost certainly wrong.

-performClick: is ugly in that it doesn't properly handle this.
-performClickWithFrame:inView: seems like a much better replacement, so
I'm in favor of adding it and deprecating [NSCell -performClick:].

Quentin Mathé wrote:
[snip]
> The idea is to
> have an NSControl method which can return the frame for the cell passed
> as a parameter,

In addition to being used by multiple views, a single cell might be used
multiple times by a _single_ view (or cell). An important example is
NSTableView, which normally uses a single cell to display all values in
one column. Thus, in the general case, there's no clear way of defining
-frameForCell:'s semantics. Unless this can be solved, I don't think
this method should be added.

- Alexander Malmberg




reply via email to

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