gnustep-dev
[Top][All Lists]
Advanced

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

Changes to NSControl


From: Fred Kiefer
Subject: Changes to NSControl
Date: Tue, 07 Jan 2003 14:44:25 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903

While working on the fix for the infamous selection error, that is caused by selecting the text of a non editable cell, I noticed a few more things on NSControl that would need changing. My fix for the original error is simply to make the text object editable while setting the text and switching back afterwards again. Perhaps the same is also needed while setting up the field editor, as some of this methods also check if the NSTextView is editable?

One of the strange things on NSControl I noticed is, that in the method mouseDown: the action mask of the cell is changed before calling the tracking code. Now this is the only place where the action mask is used at all, so resetting it looks pointless to me. I would like to just drop this code, that was probably a workaround for a problem now long gone.

The second oddity is the way NSControl implements the field editor methods. They are basically empty, although the documentation describes them in detail. Instead we have them implemented on the subclasses NSTextField, NSMatrix and NSTableView. I would suggest to move those implementations up to NSControl. The drawback of this is, that we also need the _text_object ivar in NSControl, which will never be used by some of the subclasses, but this is a minor price we have to pay.

If nobody opposes, I will do all of those changes.

Fred






reply via email to

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