[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSCell bug
Re: NSCell bug
Wed, 28 Feb 2007 23:18:26 +0100
I second this opinion. Still it is strange why your code worked
correctly on Cocoa.
I haven't read the spec. But even without having done so I would say
that posting a textDidChange notification is not of much use if the
delegate method is not able to figure out to what the value had been
changed. I don't know whether Apple is calling validateEditing, but
they definitely make sure that objectValue reflects the changes made
before this notification is posted.
I dont have a Mac. But that make sense to me that the field was
only when the edition ends. Before that the returned object would be
most of the time. That's ok for a simple number but not for a more
object like a Date or Time.
Yes, I wondered about that as well. However, there probably will be
much more number fileds in the average app than fields with more
complex qualifiers. And for these fields it might be important to know
the current contents even before editing ends.
I dont know what you need to do with the value of the field but the
should always work :
[[valueField currentEditor] string]
Anyway you're right : your code should work. I found out in the Cocoa
the -*Value methods must invokes the -validateEditing method before
and returning the value. -textDidChange doesnt.
IMHO the bug is in NSNumberFormatter. I did have problem with this
OK, so ...