Re: NSNumberFormatter in Panther
Re: NSNumberFormatter in Panther
- Subject: Re: NSNumberFormatter in Panther
- From: p3consulting <email@hidden>
- Date: Sun, 14 Dec 2003 09:46:11 +0100
I also have found some problems with NSFormatter's under Panther,
investigation showed that the main difference is that the
- (BOOL)getObjectValue:(id *)anObject forString:(NSString *)string
errorDescription:(NSString **)error
of the formatter is called on each key stroke when in Jaguar it was
called at the end
(tab, enter, click ouside of the field, closing the window)
The error string parameter is nil until the formatter is called for an
"end of editing" event.
Examples of formatters found in "Cocoa programming" by Anguish, Buck,
Yacktman work because they do test the error parameter, (as per
recommendation of the Apple documentation) but some examples from
Vermont Recipes do now crashes under Panther.
However I don't have seen the problem you describe with the standard
formatters clearing the whole field in case of errors.
Are you using built-in Cocoa formatters or formatters from a third
party ?
Pascal Pochet
P3 Consulting
On 13 dic. 2003, at 21:10, Chaz McGarvey wrote:
>
Hello:
>
>
NSNumberFormatters don't seem to work in Panther like they did in
>
Jaguar. In Jaguar when the user typed something the formatter
>
couldn't accept, it would just not accept that into the field (and it
>
probably beeped or something). In Panther I find that an attached
>
formatter causes the text field to be cleared of all it's text when a
>
wrong key is pressed. Other weird things include not being able to
>
make a number negative (by pushing dash) until at least on character
>
of the number is entered. And if a user tries to type a number that
>
is too big (when a maximum is set), then the text field is cleared.
>
>
Is this really how it is supposed to work or is something wrong?
>
>
Chaz McGarvey
>
http://www.brokenzipper.com
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.