Xojo doesn't start anymore

[quote=313130:@roland brouwers]I did a
yum update
and now it works

But
[h]Why did I do the update?[/h]
Because decimal separator doesn’t work
The instruction

dim a As string = [b]format[/b](6.25,"0.00") TextField1.Text=a
should generate : 6,25
It does it right under Win7
but under Centos6 it generates : 6.25

It’s like
dim a as currency = [b]Cdbl/b
should generate : 25.45
But under Linux it gives 2545
under Win7 it gives 25.45

The settings of Centos6 are Belgian; 12 456,55
Konqueror shows file size like 1,2 Mb
scalc works fine

DOES XOJO THREATS DECIMALS RIGHT?[/quote]
Xojo gets this information based on the locale information set in the OS.

Hallo Axel,
You are giving me an example in a Desktop version where Textfield1.appendtext works
But Textfield1.text = str(format(25.63,“0.00”)) works also in a Desktop version

Textfield1.appendtext doesn’t work in a webversion

Textfield1.text = str(format(25.63,“0.00”)) doesn’t work in a Web version

Hi Greg,
As you can read in my comment, The setting of Centos6 =
Belgian, like 12 456,55 (=comma)
I verified that and I looked at the file sizes in Konqueror and that gives like 2,1Mb (=comma)
So, if “Xojo gets this information based on the locale information set in the OS” then the result in Xojo is wrong.

[h]Conclusion[/h]
Xojo doesn’t work with Europ decimals in a Webversion

you did not tell us that you are using web

From the LR:

[quote]These examples use the CDbl function to return the numbers contained in a string.
Dim n As Double
n = CDbl(“12345”) //returns 12345
n = CDbl(“54.05car45”) //returns 54.05
n = CDbl(“123.45”) //returns 123.45
n = CDbl(“123 45”) //returns 123
n = CDbl(“123,456”) //returns 123456
n = CDbl(“auto”) //returns 0[/quote]

Dear Axel,
The above I know because it is in the manual.
But if you do this in a web project it will not work, because Xojo doesn’t know about or doesn’t respect the local settings in Linux in a web project.
Just the same as
Textfield1.text = str(format(25.63,“0.00”))
will not deliver 25,63 with the comma. I mentioned that already above.

I repeat
Xojo doesn’t know about or doesn’t respect the local settings in Linux in a web project.
because Konqueror and calc applications do it correct, as I mentioned above.

So if in the Desk project you will enter 25,36, which will be written in the database as 25.36,
How can I get this on screen in a web project as 25,36 (remember: str(format(25.63,“0.00”)) doesn’t work)

In a Web project Xojo tries to get the locale of the user set by the browser, not the server.

http://stackoverflow.com/questions/673905/best-way-to-determine-users-locale-within-browser#674570

or use

Textfield1.text = str(format(25.63,"0.00").Replace(".", ","))

in Open Event:

self.ExecuteJavaScript("alert(navigator.language);")

I used
self.ExecuteJavaScript(“alert(navigator.language);”)
which gives nl-BE
that’s correct
still the result is 25.36 (no comma)

Perhaps Paul’s blog helps

Localizing Web Apps: Dates & Numbers

Das wird etwas für Morgen. T reicht für Heute.
Danke für deine Hilfe.
Morgen gehts weiter.

Sorry, no. What it gets from the browser is the language code, and that allows you to use dynamic constants. It does not change the behavior of the locale dependent things like date, time and number formatting.