[Top][All Lists]

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

Re: [PATCH] Proposal to fix NSButtonCell issue with -setFont: -setTitle:

From: Quentin Mathé
Subject: Re: [PATCH] Proposal to fix NSButtonCell issue with -setFont: -setTitle:
Date: Fri, 25 Jun 2004 03:24:50 +0200

Le 24 juin 04, à 01:19, Fred Kiefer a écrit :

Quentin Mathé wrote:
Le 19 juin 04, à 18:28, Fred Kiefer a écrit :
From what you write, I would rather suggest that we change the methods (-image) and (-setImage) on NSButtonCell to ignore the cell type. Or did I miss something?
That would break the OpenStep specification and wouldn't be a very elegant solution.

Could you please explain how this would break the OpenStep specification more than any other change that would change the behaviour in the way you want, e.g. your own patch? This is a real question, I may just have a blind spot here.

Sorry, I have been confused with this stuff, it would break not the OpenStep specification but the Cocoa specification… here are the Apple documentation for the two methods :

- (NSImage *)image
Returns the image displayed by the receiver or nil if the receiver is not an image-type cell.

- (void)setImage:(NSImage *)image
Sets the image to be displayed by the receiver. If the receiver is not an image-type cell, the method converts it to that type. If the receiver is an image-type cell and image is nil or different from the current one, the image currently held by the receiver is released and the new one is retained.

And why is it more elegant to change the setFont: and setTitle: method not to change the cell type than the setImage one?

because bad reason : Apple has done it like that.
because better reason, I think to have setFont: setTitle: and setImage: which don't change the cell type would be different from the current GNUstep or Apple solutions but would be more elegant because we would have no more bad symetry between the three methods, then it's why I think my patch is a nice solution. In the proposed solution, the cell type would be edited only by setImagePosition:, which appears right to me because, a cell type is more characterized by the potential visibility of the image (which is under the control of the method setImagePosition:) than by the value of the image ivar itself (related to setImage: method).
I admit this last point can be discussed.

I seem to totally miss your argument. I am really not saying that one way is a lot better than the other one, but if you think so (and your mail suggests this), you should at least provide some argument for it.

I hope it is a bit more clear now.

We should try to find the best solution, not just the one somebody like best for undisclosed reasons.



Quentin Mathé

reply via email to

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