gnustep-dev
[Top][All Lists]
Advanced

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

Re: [Gnustep-cvs] Added editing methods.


From: Alexander Malmberg
Subject: Re: [Gnustep-cvs] Added editing methods.
Date: Tue, 28 Sep 2004 15:32:00 +0200
User-agent: Mozilla Thunderbird 0.5 (X11/20040306)

Fred Kiefer wrote:
Alexander Malmberg wrote:
Fred Kiefer wrote:
--- gnustep/gnustep/core/gui/Source/NSControl.m 2004/05/28 23:49:15 1.63 +++ gnustep/gnustep/core/gui/Source/NSControl.m 2004/09/24 16:35:41 1.64
[snip]
 - (void) validateEditing
[...]

This is wrong. You're completely ignoring the formatter. While this isn't the first bit of cell-related code that doesn't handle formatters correctly, I don't think it's a good idea to add _more_ such stopgap code unless there's a very good reason. Thus, why? As far as I can see, the code isn't used in -gui. How did you test it?

Sorry to have upset you so much that you did write this mail in this very offensive tone.

I'm sorry if this seemed offensive. I was simply trying to ask some questions about why you had added this code. I'm curious, not upset. No offense was intended.

First, the code is not ignoring the formatter, the formatter will be used by the cell inside of the setStringValue: and setAttributedStringValue: methods. Not that hard to check this.

True, I had missed that. Sorry.

[snip]
This change was something I started to work on at least a year ago and an early stage was even mailed to this list before, but I left it unfinished, because it will require further changes to the GUI library to have any real effect.

Do you have these changes locally?

> Currently these are just a few methods being
overwritten by all subclasses that actually use it (But than, we still need to provide these for subclasses outside of GUI).

Fair enough.

> The next step
would be to change the methods in NSTextField, NSTableView and NSMatrix to be more in line with the new superclass implementation. But if you are opposing this step , and perhaps will be able to present an argument for this, I am willing to learn.

More in line in what way? The handling of attributed strings? I don't see how you could avoid the delegate/formatter checking that NS{TextField,TableView,Matrix} do, though. Getting rid of the duplicate code would be good, but it seems that that would require a method like:

-(BOOL)validateEditingForCell: (NSCell *)c
        usingDelegate: (id)delegate;

(where the return value indicates whether the value was ok).

What I am wondering is, what in the actual change made you react in such a way? Is it me? Is it the code? Or is it that I am working on areas that are not your main concern at the moment? I just don't get it.

I suspect that most of this is caused by the fact that I missed the formatter code in NSCell; I only checked the other control implementations. Thus, the code seemed incomplete, so I wanted to know why it was being added anyway (eg. if there was some pressing need from some app, or if it was a part of larger changes, which it was).

/me gets back to hunting down obscure field editor bugs...

- Alexander Malmberg




reply via email to

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