GsQuery string is nationalized ???

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GsQuery string is nationalized ???

GLASS mailing list

I execute here a query string and:

GsQuery fromString: 'each.randomNumber > 0.5'

returns an "Parsing Error (Filter): a UserDefinedError occurred (error 2318), reason:halt, end of input expected"

but

GsQuery fromString: 'each.randomNumber > 0,5'

gives NO error.


Is this an error or is this the intended behaviour ?


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: GsQuery string is nationalized ???

GLASS mailing list
Intentional. All numbers are parsed using the Locale settings. If you want tochange the settings see Locale class>>setCategory:locale: [1]. I believe that any changes you make are not persistent, so I think you'll need to make the changes after each login ...

Dale

[1] https://downloads.gemtalksystems.com/docs/GemStone64/3.2.x/GS64-ProgGuide-3.2/6-Numerics.htm#pgfId-267102

On 05/25/2016 03:04 AM, Marten Feldtmann via Glass wrote:

I execute here a query string and:

GsQuery fromString: 'each.randomNumber > 0.5'

returns an "Parsing Error (Filter): a UserDefinedError occurred (error 2318), reason:halt, end of input expected"

but

GsQuery fromString: 'each.randomNumber > 0,5'

gives NO error.


Is this an error or is this the intended behaviour ?



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: GsQuery string is nationalized ???

GLASS mailing list

This is a strange definition - and it works if server and all customers are in the same locale. Otherwise it gets complicated.

But now all software running against this server HAS to know, which locale is defined in this server instance. I rather would like to define within the  GsQuery instance, what locale should be used to have a fixed counterpart.

Now users from different locales may enter query statements against our German locale - no problem  for me or other users in Germany, but US citizens may find this strange ...

Marten

Dale Henrichs via Glass <[hidden email]> hat am 25. Mai 2016 um 18:53 geschrieben:

Intentional. All numbers are parsed using the Locale settings. If you want tochange the settings see Locale class>>setCategory:locale: [1]. I believe that any changes you make are not persistent, so I think you'll need to make the changes after each login ...



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: GsQuery string is nationalized ???

GLASS mailing list

Well, that's an application choice you can make .. you can arrange to change the locale while parsing query expressions to match the locale of the user .. or always use a German or US locale when parsing the query expressions ... it's very similar to the way timezones are handled ... you have to make an application choice ...

Dale

On 5/26/16 3:14 AM, Marten Feldtmann wrote:

This is a strange definition - and it works if server and all customers are in the same locale. Otherwise it gets complicated.

But now all software running against this server HAS to know, which locale is defined in this server instance. I rather would like to define within theĀ  GsQuery instance, what locale should be used to have a fixed counterpart.

Now users from different locales may enter query statements against our German locale - no problemĀ  for me or other users in Germany, but US citizens may find this strange ...

Marten

Dale Henrichs via Glass [hidden email] hat am 25. Mai 2016 um 18:53 geschrieben:

Intentional. All numbers are parsed using the Locale settings. If you want tochange the settings see Locale class>>setCategory:locale: [1]. I believe that any changes you make are not persistent, so I think you'll need to make the changes after each login ...




_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass