Re: [SOLVED] NSNumberFormatter

2013-07-15 Thread Ingenieurbüro Birnfeld - Oliver Birnfeld
Hi Christoph, use the "validateKey" mechanism (where "Key" is the name of property, e.g. myNumber) public Object validateMyNumber(Object aValue) throws NSValidation.ValidationException { // 1. cast aValue to int (or whatever you need // 2. write check m

Re: NSNumberFormatter

2013-07-15 Thread Christoph Wick
E276502600 On 15.07.2013, at 11:21, Ingenieurbüro Birnfeld - Oliver Birnfeld wrote: >>> inputFormatter=new NSNumberFormatter("0"); > The same result as with "#". I think, I have to write my own validator. Any > newbie hints for that task? > > Thanks!

Re: NSNumberFormatter

2013-07-15 Thread Ingenieurbüro Birnfeld - Oliver Birnfeld
inputFormatter=new NSNumberFormatter("0"); The same result as with "#". I think, I have to write my own validator. Any newbie hints for that task? Thanks! Oliver ___ Do not post admin requests to the list. They will be ign

Re: NSNumberFormatter

2013-07-12 Thread Chuck Hill
Is the original value zero? WO might be short-circuiting something if the value does not change. Also try 0 as the format pattern: > inputFormatter=new NSNumberFormatter("0"); Chuck On 2013-07-12, at 5:21 AM, Ingenieurbüro Birnfeld - Oliver Birnfeld wrote: > Hi, >

NSNumberFormatter

2013-07-12 Thread Ingenieurbüro Birnfeld - Oliver Birnfeld
Hi, I have a problem using NSNumberFormatter to validate the input of an WOTextField. When e.g. setting formatter.setMinimum(5) and formatter.setMaximum(20) then validationFailedWithException is called for all values <0, >20, and 1-4 but _not_ for 0. Here are some code sn

Re: Infinite or NaN in NSNumberFormatter doesn't work

2012-10-29 Thread Lars Sonchocky-Helldorf
use of >> http://api.webobjects.me/wo542/com/webobjects/foundation/NSNumberFormatter.html#setStringForNotANumber(java.lang.String) >> which oddly doesn't seem to work >> >> Here is my code for this: >> >> public synchronized NSNumberForma

Re: Infinite or NaN in NSNumberFormatter doesn't work

2012-10-29 Thread Johann Werner
> > public synchronized NSNumberFormatter twoDecimalPlacesNumberFormatter() > { > if (twoDecimalPlacesNumberFormatter == null) > { > twoDecimalPlacesNumberFormatter = new > NSNumberFormatter(); >

Infinite or NaN in NSNumberFormatter doesn't work

2012-10-25 Thread Lars Sonchocky-Helldorf
Hi list, I am trying to make use of http://api.webobjects.me/wo542/com/webobjects/foundation/NSNumberFormatter.html#setStringForNotANumber(java.lang.String) which oddly doesn't seem to work Here is my code for this: public synchronized NSNumberFormatter twoDecimalPlacesNumberForm

Re: bug or feature in NSNumberFormatter

2010-06-18 Thread Michael Schmiedgen
>> I get strange behaviour if and only if formatting the >> value of zero. Am I something missing? Or what is the >> point here? >> >> - >> >> NSNumberFormatter nf = new NSNumberFormatter("__0.00"); >> >> nf.setLocalizesPatter

Re: bug or feature in NSNumberFormatter

2010-06-17 Thread Chuck Hill
Hi Michael, On Jun 17, 2010, at 10:29 AM, Michael Schmiedgen wrote: Hi list, I get strange behaviour if and only if formatting the value of zero. Am I something missing? Or what is the point here? - NSNumberFormatter nf = new NSNumberFormatter("__0.00"); nf.setLocalizesPa

bug or feature in NSNumberFormatter

2010-06-17 Thread Michael Schmiedgen
Hi list, I get strange behaviour if and only if formatting the value of zero. Am I something missing? Or what is the point here? - NSNumberFormatter nf = new NSNumberFormatter("__0.00"); nf.setLocalizesPattern(true); nf.format(new Integer(0)); // formatted nu

Re: NSNumberFormatter vs NumberFormat

2008-02-13 Thread Chuck Hill
nd Date handling? No, but moving to pure Java is not likely to make me happier. Chuck On Feb 8, 2008, at 6:00 PM, Mr. Pierre Frisch wrote: There was a long discussion about the NSTimestampFormatter not long ago. I would put the NSNumberFormatter in the same bag. Duplicate API, should be

Re: NSNumberFormatter vs NumberFormat

2008-02-09 Thread Mr. Pierre Frisch
... you name it. Is anyone out there who is happy with the current Java/WO Time and Date handling? cheers gt On Feb 8, 2008, at 6:00 PM, Mr. Pierre Frisch wrote: There was a long discussion about the NSTimestampFormatter not long ago. I would put the NSNumberFormatter in the same bag. D

Re: NSNumberFormatter vs NumberFormat

2008-02-09 Thread Georg Tuparev
s a long discussion about the NSTimestampFormatter not long ago. I would put the NSNumberFormatter in the same bag. Duplicate API, should be deprecated. I did not do it as it was was working for most people but I don't see the point of fixing bugs there when the Java one work perfectly f

Re: NSNumberFormatter vs NumberFormat

2008-02-08 Thread Lachlan Deck
On 09/02/2008, at 4:03 AM, Daniele Corti wrote: 2008/2/8, Michael Halliday <[EMAIL PROTECTED]>: Just a question regarding the use of NSNumberFormatter vs NumberFormat. Hi Michael, Look I'm not an expert of this, but I see that NumberFormat has not the format() method

Re: NSNumberFormatter vs NumberFormat

2008-02-08 Thread Daniele Corti
2008/2/8, Michael Halliday <[EMAIL PROTECTED]>: > > Hey list!! > > Just a question regarding the use of NSNumberFormatter vs NumberFormat. > > We're working on localizing one of our app for use in multiple > countries. We are dealing with decimal and currency f

Re: NSNumberFormatter vs NumberFormat

2008-02-08 Thread Mr. Pierre Frisch
There was a long discussion about the NSTimestampFormatter not long ago. I would put the NSNumberFormatter in the same bag. Duplicate API, should be deprecated. I did not do it as it was was working for most people but I don't see the point of fixing bugs there when the Java one

NSNumberFormatter vs NumberFormat

2008-02-08 Thread Michael Halliday
Hey list!! Just a question regarding the use of NSNumberFormatter vs NumberFormat. We're working on localizing one of our app for use in multiple countries. We are dealing with decimal and currency formats in a variety of locales. Just wondering what everyone else uses and the pro