Hello Fred,
*NSCell
*We make sure the value returned by objectValue complies with the set
formatter, e.g. doing setObjectValue:[NSCalendarDate calendarDate] and
then retrieving the objectValue should give us 2005-12-13 00:00:00 if
the formatter is set to %d.%m.%Y. The old implementation returned
something like 2005-12-13 17:35:02 which is wrong.
thank you for this change request. I must admit that I am still a bit
puzzled about this. You are stating that when setting the object value
of a cell Cocoa takes the object value, generates the string value via
the formatter and then extracts the actual object value from this
string
value. This looks wired to me.
I doubt that Cocoa uses this way to gain the expected the result. They
will most likely make the objectValue comply already before they set
the ivar. This is just the easiest way to get the result based on the
current GNUstep implementation of NSCell.
Do you have prove that this is the actual
behaviour on MacOSX?
Yes, this is definitely the behaviour you get on MacOSX and I bet also
on OPENSTEP. It's what a developer would expect. If I set the formatter
to be %d.%.m.%Y I am clearly stating that I am not interested in a
possible time offset. If I want to use the returned objectValue of such
a cell (e.g. for a qualifier) I expect that the time of the returned
value is 00:00:00, otherwise I would have added %H:%M or whatever to
the formatter.
Apart from that it looks very strange, I don't see any problem with
applying your patch.
Thanks,
Andreas
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep