[Top][All Lists]

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

Re: Problem with NSDateFormatter

From: Philippe Roussel
Subject: Re: Problem with NSDateFormatter
Date: Wed, 25 Aug 2010 09:29:33 +0200

Le mercredi 25 août 2010 à 08:55 +0200, Wolfgang Lux a écrit :
> 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.

Ok, so it used to work by luck I guess.

> > 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.

Thanks for the tip.


reply via email to

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