[Top][All Lists]

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

Re: Problem with NSDateFormatter

From: Wolfgang Lux
Subject: Re: Problem with NSDateFormatter
Date: Wed, 25 Aug 2010 08:55:42 +0200

Philippe Roussel wrote:

Last detail : if I remove [AppointmentEditor controlTextDidChange:] or
just don't call [NSTextField objectValue] everything works correctly.
I could rework my code to avoid controlTextDidChange: but even if my
code is ugly it should work as is I think.

I don't think so. AFAICT, your code wouldn't work on OS X either.

A NSTextField method returning the current string without validating
it could be useful.

You should ask the field editor directly for the current input. You can
look up the field editor under the NSFieldEditor key in the userInfo
dictionary of the notification passed to -controlTextDidChange:. And you
probably then want to ask the formatter whether the input text is valid.

Would you like a bug report on savannah with these informations ?

I guess not. :-)


reply via email to

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