bug-gnustep
[Top][All Lists]
Advanced

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

Re: Patches for NSCell.m, NSActionCell.m, NSNumberFormatter.m


From: Adam Fedor
Subject: Re: Patches for NSCell.m, NSActionCell.m, NSNumberFormatter.m
Date: Wed, 11 Jun 2003 21:31:48 -0600
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.1) Gecko/20020905



Dirk Lattermann wrote:
Hello,

EOInterface's EOControlAssociation works by setting the object value
of its control.  When binding it to an NSTextField, I noticed that
the text field doesn't show the value set by the association.

The other way around, after typing text into an NSTextField, one
cannot read its value out via objectValue as I now think one should
be able to (see my recent post on NSTextField one or two weeks ago).

The first case is obviously caused by a missing setObjectValue: in
NSActionCell (see attached patch).

The second case seems to be repaired by my patch attempt on NSCell.m,
but I'm not sure if it's right.  Maybe _contents and _objectValue
mustn't point to the same string, i.e., one should be copied.  Or maybe
the string value/object value mechanism isn't meant to be like I assume?

My patch on NSNumberFormatter.m is a quick, easy and dirty way to
provide at least a conversion from string to number for simple numbers
(e.g. integers) without any provided format.  I think it's better than
no conversion at all, maybe an NSLog should be added that no real
converter is in place, use at own risk, etc.  I couldn't find out if
the returned anObject should be retained or not, so that must maybe
added.


I added the NSActionCell patch, but not the NSCell patch, since the documentation says that a cell can't have a valid object unless it has a formatter.

I added something like the NSNumberFormatter patch and a also started a bug report so that maybe someone will get around to implementing it correctly.





reply via email to

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