Friday, March 06, 2009

Unit conversion in 4.3

Library

I wanted to use conversion code outside runner so now all conversion code is in a library. It also has few new categories: currency, energy, fuel efficiency, power, pressure and time.

Unit Converter Runner

Converter runner now shows all conversions that text matches.



Unit Converter Widget

I got permission from Gerhard (original author of unit converter widget) to convert widget to use same library converter runner uses. Now widget has same categories and units runner has.

Some people have complained that there is no way to know what units Unit Converter Runner supports. Hopefully these changes to runner and widget help also on that.


Hmmm, no wonder my head hurts...

10 Comments:

Anonymous Anonymous said...

In your last screenshot the label is not aligned to the combobox. Is this the default configuration or just a misconfiguration?

15:22  
Blogger Petri Damstén said...

Alignment now fixed in SVN.

16:08  
Blogger Unknown said...

is there any documentation to the syntax of the conversion string? the symbol ">" isn't very intuitive to me.

19:51  
Anonymous Anonymous said...

I’m a die-hard British metric user, but seeing conversions like this make me twinge: eugh, decimal feet, such a bastardisation of Imperial units.
3 feet 3 inches is the actual answer.

22:57  
Blogger Unknown said...

This comment has been removed by the author.

02:30  
Blogger Unknown said...

Hey there,
I did something like this a few years back, in C. I don't know if you've finished or not, but if you aren't check out this forum: http://www.portugal-a-programar.org/forum/index.php/topic,7781.0.html
My code might be able to fasten the process. If it is indeed helpful, let me know and I'll translate the comments.
It's a portuguese forum, but you should be able to find the code right away...

02:39  
Anonymous Anonymous said...

ugh, it's "litre"

15:44  
Blogger André Somers said...

@anonymous: wouldn't that depend on whether you were using US or UK English?

18:51  
Anonymous Anonymous said...

André: No, but do read on:

It’s not as clear as people always assume.

British English, which is the basis for the majority of English-derivatives around the world, uses litre. That would include the UK, Australia, Canada, India, various African countries, and more from the Commonwealth.
Liter is used in America, and a few of their colonies.

The only locale that should output ‘liter’ in English is _US. So try to avoid thinking it’s just a US/UK issue.

ps
There are European languages that use liter in their native spelling, but we can ignore that for this argument.

01:42  
Anonymous Anonymous said...

I find it rather ironic that the US, despite not using metric, feels it has to impose its (mis-)spellings of metre and litre on the rest of the world.

The talk page on Wikipedia article for metres is a prime example of this.

We have SI units for a reason, so everyone uses the same standards. Why anyone has to break them is beyond me, especially a country which still uses imperial.

01:48  

Post a Comment

<< Home