Unit Converter Dashboard Widget cranky

by Jimmy Liew on 11 March, 2009

The Unit Converter Dashboard widget provided by Apple has been giving me wrong conversion since the last OS X 10.5.6 update. Although the economy is bad, but not to the extend where a unit of US$ showed up as an astonishing S$3.751.

Going back to my Internet best friendGoogle – I found that it was a coding error in the javascript file for the widget as shown in this Mac OSX Hints page. It resulted in the drop down menus for the countries not tallying with the rates that were downloaded. For example, if you choose the top two countries on the drop down menu, on the left it shows Australia and on the right USA. But both rates ended up $A1 = US$1, which is incorrect.

Unit Converter gives wrong info

Thankfully, the work around is pretty simple.

Firstly, locate the widget file at /Library/Widgets/ as “seen here”. Next, drag it onto your Desktop to create a copy of the Unit Converter.wdgt. Right click on the file and click Show Package Contents to access the files that run the widget.

Open this file UnitConverter.js with your text editor and search for this line: if (a.iso == "USD") return -1;. Delete that line, and on the next line which reads: else if (a.name < b.name) return -1;, delete the word else from that line. (see image below)

converter-screwed-4

Once that is done, save the file and drag it into the Widgets folder found in your User folder: ~/Library/Widgets so that you won’t overwrite the system’s copy.

Double click the file to make sure the edited copy is installed, and you should be able to see that the country lists on both drop downs are the same, and the conversion is correct.

converter-screwed-5

Share and Enjoy:
  • Digg
  • Facebook
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • Ping.fm
  • StumbleUpon
  • Technorati
  • Yahoo! Buzz

Related posts:

  1. Mac OS X 10.5.7 Update

{ 3 comments… read them below or add one }

1 Tetanus 12 March, 2009 at 12:23 am

I’ve been wondering for the longest time why the currency converter never worked for me.

Great post!

Reply

2 hauk 20 March, 2009 at 12:07 am

Thanks a lot! This has bugged me for some time now or to be exact since 10.5.6 :-)

Reply

3 John Britten 6 April, 2009 at 4:48 am

We have several Macs at home running OS 10.5.6 and they all have a serious error in the Currency Converter part of Dashboard, E.g. 1 Euro =..134 Euro. The problem is that the two columns of currency are one line out of phase,

iHeartApple says a coding change is needed but we are not programmers.

The faukt has been present for weeks and has almost cost us large sums of money.

Please send a fix urgently,

JB 5 April 2009

Reply

Leave a Comment

Previous post:

Next post: