Feb 26, '09 07:30:00AM • Contributed by: Anonymous
The Unit Converter Widget is broken in Mac OS X 10.5.6: the left and right pop-up menus do not match, and Apple's code assumes they do. On the left menu, the Australian dollar appears at the top; on the right menu, it's the US Dollar. As a result, conversions come out incorrectly!
To fix this problem, make a copy of /Library/Widgets/Unit Converter.wdgt on your Desktop, Control-click on it and choose Show Package Contents from the pop-up menu, then open the UnitConverter.js file in a text editor. Search for "USD" (with the quotes). There should be only one matching line:
if (a.iso == "USD") return -1;
Delete this line. Then, delete the else at the start of the next line, i.e. change the line from this...
else if (a.name < b.name) return -1;
...to this...
if (a.name < b.name) return -1;
Save the changes and close the document. I suggest keeping the original widget in /Library/Widgets, and installing the corrected version in ~/Library/Widgets, so that the system's version remains untouched.
[robg adds: When originally posted, I thought this was merely a display glitch, but it's not -- the calculations simply won't work properly with the two lists not being the same. You can test this yourself by converting any number in the default widget as it appears -- enter 55 in the left-side box, for instance, with the left pop-up on Australian Dollar and the right on US Dollar, and you'll see that the result is also shown as 55. Clearly that's not correct. This hint fixes that problem. Sorry for the confusion.]
