Re: Properly formatted large numbers

2010-02-10 Thread Michael Lew
Thanks Terry and Alex.

Yes, I suspect that your suggestions would work, but both involve me working
out how to trap clicks in the datagrid. That seems like more effort than I
can put in at the moment: I've found datagrids to be a bit of a mystery so
far and teaching starts here next week :-(

This is a very nice example from today's list digest that shows why this
issue can be important:

>> Hi Jacque, I made the suggestion I did because at 100 Million records plus
> 
> 100 million? Yes, well...I think I read the zeros wrong.

Should there not be a numberformat setting that formats the numbers for
human readability using the system setting of delimiter?

Regards,
Michael

>> Dear Listers
>> 
>> I'm working on some statistical simulations and regularly get output numbers
>> with anything from 1 to 7 digits. They are hard to read when they don't have
>> the conventional commas separating the thousands and millions. I've written
>> a simple function that does the comma formatting for me but it mucks up
>> sorting. Of course. (I'm using a datagrid to display the results and live
>> sorting is really handy.)
>>  

Terry Judd responded:
> 
> Can you have two columns - one formatted, one not - and somehow apply the
> sort to the unformatted column. I guess the unformatted column would have to
> be of invisible and you'd need to have some way of trapping the selection of
> the column header. You might need Trevor's help there.
> 
> Terry...

Alext Tweedy suggested:

> I've not yet used a datagrid, so this is a guess 
> 
> can you supply a custom sort function ? Something like
> 
> function testLessThan p1, p2
> replace comma with empty in p1
> replace comma with empty in p2
> return p1 < p2
> end testLessThan
> 
> -- Alex.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Properly formatted large numbers

2010-02-10 Thread Alex Tweedly

Michael Lew wrote:

Dear Listers

I'm working on some statistical simulations and regularly get output numbers
with anything from 1 to 7 digits. They are hard to read when they don't have
the conventional commas separating the thousands and millions. I've written
a simple function that does the comma formatting for me but it mucks up
sorting. Of course. (I'm using a datagrid to display the results and live
sorting is really handy.)
  

I've not yet used a datagrid, so this is a guess 

can you supply a custom sort function ? Something like

function testLessThan p1, p2
replace comma with empty in p1
replace comma with empty in p2
return p1 < p2
end testLessThan

-- Alex.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Properly formatted large numbers

2010-02-09 Thread Terry Judd
Can you have two columns - one formatted, one not - and somehow apply the
sort to the unformatted column. I guess the unformatted column would have to
be of invisible and you'd need to have some way of trapping the selection of
the column header. You might need Trevor's help there.

Terry...


On 10/02/10 2:17 PM, "Michael Lew"  wrote:

> Dear Listers
> 
> I'm working on some statistical simulations and regularly get output numbers
> with anything from 1 to 7 digits. They are hard to read when they don't have
> the conventional commas separating the thousands and millions. I've written
> a simple function that does the comma formatting for me but it mucks up
> sorting. Of course. (I'm using a datagrid to display the results and live
> sorting is really handy.)
> 
> Does anyone have an easy way to deal with this? I'm tempted to use a fixed
> pitch font so that larger numbers always look longer, but that would be a
> kludgey workaround.
> 
> (I note that in OSX the Finder puts separators in the correct places in
> large numbers using the settings of the International System Preferences.)
> 
> Regards,
> Michael

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Properly formatted large numbers

2010-02-09 Thread Michael Lew
Dear Listers

I'm working on some statistical simulations and regularly get output numbers
with anything from 1 to 7 digits. They are hard to read when they don't have
the conventional commas separating the thousands and millions. I've written
a simple function that does the comma formatting for me but it mucks up
sorting. Of course. (I'm using a datagrid to display the results and live
sorting is really handy.)

Does anyone have an easy way to deal with this? I'm tempted to use a fixed
pitch font so that larger numbers always look longer, but that would be a
kludgey workaround.

(I note that in OSX the Finder puts separators in the correct places in
large numbers using the settings of the International System Preferences.)

Regards,
Michael
-- 
Michael J Lew
Senior Lecturer
Department of Pharmacology
email: micha...@unimelb.edu.au
phone: +61 3 8344 7812

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution