Hi Marco,

I just saw your (new) regular expression; did you notice that the dot (.) in a
regular expression is a 'character class' and not a 'literal dot'?

In this case the dot means 'Any character except newline or another Unicode
line terminator', so it will also fit the "literal dot".

I think you should escape that dot and use this RegExp instead:

/(\d|,|\.)/

Best regards,
  Peter


On 2011-09-13 17:03 Marco Pompili wrote:
> Hi martin,
> 
> I've partially solved.
> 
> The problem was that i didn't allow dots in the regexp:
> this.setFilter(/(\d|,)/); //Stuuuupid
> 
> Now I'm using this one: this.setFilter(/(\d|,|.)/);
> 
> Now the dots always appears.
> 
> I got i minor problem now, the text cursor doesn't remain at the end of the
> textfield.
> 
> Like this: if i got this formatted number: 1.000|<--- text cursor
> 
> If i add another zero the cursor doesn't appear at the end: 10.00|0
>                                                                               
>                                   
> ^text-cursor
> There's a way to force the cursor at the end of the TextField ?
> 
> Thank you for your time.
> 
> -----
> La coincidenza non ha madre.
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/Number-formatting-and-separators-tp6776330p6787573.html
> Sent from the qooxdoo mailing list archive at Nabble.com.


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to