Systemlanguage

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Systemlanguage

Malte Brill

Hi all,

I am looking for a way to reliably detect the Systemlanguage cross  
platform. I can not come up with an easy way to do this from within rev.

What I am using now to detect german:

set the useSystemDate to true
if "Donnerstag" is among the lines of the weekdaynames then
   -- it is german
end if

Does anyone see a problem with this? Is there an easier / more  
elegant way to do this?

All input highly appreciated.

All the best,

Malte


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Systemlanguage

Dave Cragg

On 13 Nov 2006, at 12:41, Malte Brill wrote:

>
> Hi all,
>
> I am looking for a way to reliably detect the Systemlanguage cross  
> platform. I can not come up with an easy way to do this from within  
> rev.
>
> What I am using now to detect german:
>
> set the useSystemDate to true
> if "Donnerstag" is among the lines of the weekdaynames then
>   -- it is german
> end if
>
> Does anyone see a problem with this? Is there an easier / more  
> elegant way to do this?

On Mac OS X at least (but I think on Windows too) users can override  
the default date format. For example, on my otherwise English OS, I  
can select a German date format as the system date.

I don't know of another way to do this, but I bet someone can.

Cheers
Dave
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Systemlanguage

Dave Cragg
In reply to this post by Malte Brill

On 13 Nov 2006, at 12:41, Malte Brill wrote:

>
> Does anyone see a problem with this? Is there an easier / more  
> elegant way to do this?

On OS X, the following will produce a string language abbreviations:


   put "defaults read -g" && quote & "AppleLanguages" & quote into tCmd
   put shell(tCmd) into field 1


Produces this:

(en, ja, de, fr, nl, it, es, da, fi, ko, nb, pt, sv, "zh-Hans", "zh-
Hant")

I presume the first item in the list is the deault system language,  
in this case "en" for English.

Is an equivalent on Windows?

Cheers
Dave
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Systemlanguage

Eric Chatonet
In reply to this post by Malte Brill
Hi Malte,

Have a look at "Getuserlang" stack from Trevor on RevOnline: all you  
want is there ;-)

Best Regards from Paris,
Eric Chatonet

Le 13 nov. 06 à 13:41, Malte Brill a écrit :

>
> Hi all,
>
> I am looking for a way to reliably detect the Systemlanguage cross  
> platform. I can not come up with an easy way to do this from within  
> rev.
>
> What I am using now to detect german:
>
> set the useSystemDate to true
> if "Donnerstag" is among the lines of the weekdaynames then
>   -- it is german
> end if
>
> Does anyone see a problem with this? Is there an easier / more  
> elegant way to do this?
>
> All input highly appreciated.
>
> All the best,
>
> Malte
------------------------------------------------------------------------
----------------------
http://www.sosmartsoftware.com/    [hidden email]/


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Systemlanguage

ScottR
In reply to this post by Malte Brill
Recently, Malte Brill wrote:

> I am looking for a way to reliably detect the Systemlanguage cross
> platform.

You may already have an answer for OSX.  I've used this for Windows:

  go url "http://www.tactilemedia.com/download/languagespecs.rev"

IIRC, any version of Windows older than Win2K (?) stores language info in a
file, as opposed to the registry.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: [hidden email]
W: http://www.tactilemedia.com


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Systemlanguage

Trevor DeVore
In reply to this post by Eric Chatonet
On Nov 13, 2006, at 5:51 AM, Eric Chatonet wrote:

> Hi Malte,
>
> Have a look at "Getuserlang" stack from Trevor on RevOnline: all  
> you want is there ;-)

Just a note about that stack - I recently came across a scenario  
where the Windows code returned an incorrect value.  It happens on  
systems where the language that is installed and the language setting  
in the regional settings do not match (e.g. English install running  
in german speaking Switzerland).  In these cases reading the registry  
setting returns "German" even though the system is displaying  
English.  The Windows multi language add-on may also cause problems.

After going over the MSDN docs I was unable to find a registry  
setting that can be used to retreive the correct value.  The MSDN  
docs state that you should use a Windows API call on XP/2000.  So  
right now I use a modified version of the handler in the  
"Getuserlang" stack that uses an external to get the correct language  
on Win XP/2000.  This works reliably in the above stated case.  If I  
can find (or someone can point me to) a pure Transcript solution then  
I will update it.  I think I've added some more languages since I  
posted the RevOnline version so I need to update it in any case.

--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[hidden email]


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Systemlanguage

Luis-24
If there's no Transcript solution you could opt for a Perl shell module
and then scan the output in Rev.

http://search.cpan.org/search?query=langtags&mode=all

Has for Win32 also (you'd need to install Perl).

Built into OS X at: /System/Library/Perl/5.8.6/I18N (I think the Win32
module is also included in this one, haven't checked).

Another option would be to see how the Perl module is doing it and
converting it to a Transcript equivalent.

Cheers,

Luis.

Thought I'd contribute something non-destructive for a change...


Trevor DeVore wrote:

> On Nov 13, 2006, at 5:51 AM, Eric Chatonet wrote:
>
>> Hi Malte,
>>
>> Have a look at "Getuserlang" stack from Trevor on RevOnline: all you
>> want is there ;-)
>
> Just a note about that stack - I recently came across a scenario where
> the Windows code returned an incorrect value.  It happens on systems
> where the language that is installed and the language setting in the
> regional settings do not match (e.g. English install running in german
> speaking Switzerland).  In these cases reading the registry setting
> returns "German" even though the system is displaying English.  The
> Windows multi language add-on may also cause problems.
>
> After going over the MSDN docs I was unable to find a registry setting
> that can be used to retreive the correct value.  The MSDN docs state
> that you should use a Windows API call on XP/2000.  So right now I use a
> modified version of the handler in the "Getuserlang" stack that uses an
> external to get the correct language on Win XP/2000.  This works
> reliably in the above stated case.  If I can find (or someone can point
> me to) a pure Transcript solution then I will update it.  I think I've
> added some more languages since I posted the RevOnline version so I need
> to update it in any case.
>
> --Trevor DeVore
> Blue Mango Learning Systems - www.bluemangolearning.com
> [hidden email]
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Systemlanguage

Trevor DeVore
On Nov 14, 2006, at 2:01 AM, Luis wrote:

> If there's no Transcript solution you could opt for a Perl shell  
> module and then scan the output in Rev.

For my needs the C Windows API call wrapped in an external is cleaner  
as there is nothing else to install.

> Another option would be to see how the Perl module is doing it and  
> converting it to a Transcript equivalent.

If anyone finds a module that does that and translates it to  
Transcript then that would be great.


--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[hidden email]


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Spreadsheet Type Layout in RunRev?

Dave-272
Hi,

I have a stack that requires I have perform arithmetic on columns and  
rows of numbers. Basically I have to just add up a list of fields and  
put the answer in another field. One problem is that row can be  
inserted into the list. I'm trying to figure out the best way of  
doing this in RunRev, one thing I thought of was to make a row of  
fields into a group, you could then scan all the fields in the group  
in order to calculate the total.

Any other ideas/suggestions??

Cheers
Dave



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Spreadsheet Type Layout in RunRev?

Martin BLACKMAN
Do the numbers have to be in separate fields rather than one big field?

On 14/11/06, Dave <[hidden email]> wrote:

> Hi,
>
> I have a stack that requires I have perform arithmetic on columns and
> rows of numbers. Basically I have to just add up a list of fields and
> put the answer in another field. One problem is that row can be
> inserted into the list. I'm trying to figure out the best way of
> doing this in RunRev, one thing I thought of was to make a row of
> fields into a group, you could then scan all the fields in the group
> in order to calculate the total.
>
> Any other ideas/suggestions??
>
> Cheers
> Dave
>
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Spreadsheet Type Layout in RunRev?

Bernard Devlin
In reply to this post by Dave-272
There was a discussion in May this year called: "number of columns in  
a table field" which highlighted different ways people are dealing  
with such table objects (and the limitations with them).  The general  
feeling (I believe) is that the table object in Rev is really quite  
limited, and for anything more sophisticated people are using grouped  
fields.  However, there seem to be limits mentioned in the discussion  
above concerning the number of fields that could be grouped before  
problems occured (something like 2000 columns, I seem to remember).

There was also this discussion "Newby questions: Using a table field  
as a spreadsheet" (again, in May).  Eric's "How to Manage Table  
Fields" tutorial may be of interest to you (available from  
www.sosmartsoftware.com) - it's mentioned in that discussion.

Bernard
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Spreadsheet Type Layout in RunRev?

Jim Ault
My preference would be to create and work with arrays...
but part of your decision boils down to 4 things:

Display of tabular data
User input, modification of each cell, or copy paste rows, etc
Calculation, updating sums, refresh time, complex formulas
Triggering the recalc

Since most users are familiar with full-app spreadsheets, they can expect a
standard that is too high to emulate in Rev.  Perhaps the next version 3.0
will have tools for this to work better.

Bernard gave you a very good path to follow to get closer to your goal.

Jim Ault
Las Vegas
On 11/14/06 7:25 AM, "Bernard Devlin" <[hidden email]>
wrote:

> There was a discussion in May this year called: "number of columns in
> a table field" which highlighted different ways people are dealing
> with such table objects (and the limitations with them).  The general
> feeling (I believe) is that the table object in Rev is really quite
> limited, and for anything more sophisticated people are using grouped
> fields.  However, there seem to be limits mentioned in the discussion
> above concerning the number of fields that could be grouped before
> problems occured (something like 2000 columns, I seem to remember).
>
> There was also this discussion "Newby questions: Using a table field
> as a spreadsheet" (again, in May).  Eric's "How to Manage Table
> Fields" tutorial may be of interest to you (available from
> www.sosmartsoftware.com) - it's mentioned in that discussion.
>
> Bernard
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Spreadsheet Type Layout in RunRev?

MisterX
I've been pounding this one as I too wrote my own tables, sorted titles,
variable split columns, etc...

And there is a simple solution to all this mumbojumbo of using more than 100
fields!

That's like yielding an elephant to kill a mosquito! I've seen "table" files
at work... Some are 1GB, no prob! Obviously reading that is not "realistic"
in rev or any computer for that matter...

What you need is a windowed buffered display of your table...

You can only display so many cells on screen after all! And each can only
have so many rows and lines and there's also a text limit somewhere!

So you need scrollbars to go up and down, left and right of the spreadsheet
cells...

So we imagine 1 big field, x columns of field lists or x by y fields in a
scrolling group. The trivial solutions...

Except sooner or later you hit the limit!

Sooner or later, your field will be too big or you'll have too many fields
to adjust to make it "workeable". And you can't have multiple alignments per
field column (buuh)!

And worse, you cant display it all on screen!

So what you see is your buffer size... a grid of x by y cells.

Your stack shows x columns and y rows.

Divide your data array's rows and columns by the "displayed" grid rows and
columns number to get the max value of the scrollbar vertically and
horizontally (respectively :).

 +-------------------------+ -
 |_25/H_|____________|______| A
 |______|____26/I____|______| |   (note the array position
 |______|____________|______| +
 |______|__Field_wo__|______| +
 |______|_scrollbars_|______| |
 |_30/H_|____________|_30/J_| V
 +-------------------------+

 |<----------++----------->|    <-- a scrollbar control

The field(s) don't have a scrollbar...

The scrollbars controls move the pointer on your field much like a field
does, except when you scroll, you put the data from that "window" (or xy
position) of the array into your spreadsheet field(s).

So you see, there is a simple solution for any problem... Learning to
program is a great adventure into logic and how to solve complex issue with
simple workings...

Learning the basics always bring clean solutions to advanced objects
though...

I leave the script as an exercise - because I want to see other's ideas. But
IMOHO, for any "unlimited" spreadsheet, this is the way to go... Just create
the ilusion it's infinite!

Anyone who's writen a bird-view video game needs this technique too. Works
also for graphic grids, charting, etc...

Printing solutions anyone?

You could feed serial printers (I imagine you can still find them)...

Exporting into Excel or an html browser doesn't get you points (though it
gets you through the day quicker and more to everyone's reach and
convenience!) Alas rev is not the ultimate destop tool yet.

cheers
Xavier
http://monsieurx.com

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Spreadsheet Type Layout in RunRev?

Bernard Devlin
In reply to this post by Dave-272
Xavier said:

 >>
What you need is a windowed buffered display of your table...
<<

I like your thinking on this Xavier.  I think you are right that this  
sounds like the best way to do this.


Bernard
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution