janschenkel at yahoo.com
Thu Sep 26 11:53:01 EDT 2002
It's definitely possible, and you can accomplish it by
adapting the script I provided a few days ago for
Relevant link to the use-revolution archive:
Simply change the last line of insertCommas from
return tMinusHold & pNumber & tDecimalHold
to the following code
put tMinusHold & pNumber & tDecimalHold into \
replace "," with " " in tResult
replace "." with "," in tResult
The problem with that, however, is that when the user
enters the field again, the data won't be seen as
"numeric" as MC/RR evaluates an expression as a number
only if it's in the decimal-point-without-commas
Of course you could change it back to numeric format
on openField, but that would be confusing to the user
to say the least...
It's on my to-do list to figure out a good way to
handle that. My main focus was on preventing the
typing and/or pasting of unwanted characters.
"As we grow older, we grow both wiser and more foolish
at the same time."
--- yves COPPE <yvescoppe at skynet.be> wrote:
> Hi Jan
> in your script for numeric fld, I've understood that
> you can change
> the numbers after the decimal with
> put format("%16.3f", tNumber) into tFormatted
> if we change .3f with .2f, it gives 2 numbers after
> Now : 2 problems :
> 1) I'd like the separator of decimal is a comma and
> not a point.
> is it possible ?
> 2) I' d like a separator for the thousands (a space
> for example)
> so : 123456789 -> 1 234 567,89
> can you insert that in your script ?
> Yves COPPE
> Email : yvescoppe at skynet.be
> use-revolution mailing list
> use-revolution at lists.runrev.com
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
More information about the Use-livecode