Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Modify the Currency Converter widget's pop-ups System 10.5
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.]
    •    
  • Currently 2.50 / 5
  You rated: 4 / 5 (10 votes cast)
 
[22,337 views]  

10.5: Modify the Currency Converter widget's pop-ups | 22 comments | Create New Account
Click here to return to the '10.5: Modify the Currency Converter widget's pop-ups' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Modify the Currency Converter widget's pop-ups
Authored by: auco on Feb 26, '09 08:33:41AM

very useful hint - thanks!
Especially since it's not only a graphical error but also affected the calculation.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: robg on Feb 26, '09 08:58:55AM

You are correct -- it's more than a visual glitch. I've updated the hint to make it obvious that this bug affects calculations, not just appearances.

Sorry for the confusion.

regards,
-rob.



[ Reply to This | # ]
Unit Converter currency list error due to Safari 4 beta
Authored by: asher on Mar 05, '09 07:36:28PM

I took a fresh 10.5.6 system with all updates applied. The currency converting section of Unit Converter worked as expected. I applied the Safari 4 beta, then the country lists had changed as reported here. The left side list used to have USA on top, now doesn't. The converter seems to work by the position of the country in the list rather than by the name. Thus in the incorrect version the British pound used to be 5th in the list. If you pick the country fifth in the list you get the correct conversion for the pound. Looks strange, but works. Makes one wonder what other things might have been affected by the beta that seem unrelated to Safari. Well it's a beta, pays your money, takes your chances.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: encro on Feb 26, '09 11:48:11AM

I had noticed the sequence had changed but didn't realise the calculation was messed up also. Nice work!

Thank you!

---
Steve



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: mrkgoo on Feb 26, '09 12:11:53PM

Since the two pop-up lists are out of sync, and nothing has changed in the application, I wonder if something hasn't changed in Mac OS X to reorder the first pop-up alphabetically. I assume the second pop-up information comes from Yahoo, so maybe they could rearrange the order for information downloaded (see the .plist).



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: keith_rollin on Feb 26, '09 03:39:29PM

Odd, the widget works for me. USD appears at the top in both lists. This seems enforced in the following lines in updateUIElements():

populateUnitSelect($('fromUnit-popup'));
populateUnitSelect($('toUnit-popup'));

Both lists are created the same way. So why is the ordering different for the people who are affected by this?

AFAIK, I'm running plain old stock 10.5.6



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: fordred on Feb 26, '09 04:39:19PM

A possible bug caused by using Safari 4? It was working fine until recently.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: mrkgoo on Feb 26, '09 09:34:17PM

Maybe it was initiated by Safari 4 - there's certainly more people experiencing it within the last couple of days, but this issue was afflicting some as far back as July 2008.

I have a feeling this may have more common recently, as it definitely didn't affect me earlier this year.

I haven't applied the fix, because I'm sure it's something else.



[ Reply to This | # ]
Currency Converter errors
Authored by: asher on Feb 27, '09 04:46:59AM

I certainly am glad to see this hint. A friend bought me a book for 25 pounds. To find what I owed her using Currency Converter saw that the result came up as 48 cents in USA. Whoa, didn't think the financial crisis was that bad. Using 10.5.6. Now I know what's wrong.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: Michelasso on Feb 27, '09 10:19:12AM

It works fine with me. I don't understand what the problem should be. I have

EURO
USD
GBP
AUD

On my list. The values are just fine. Maybe because I have the Italian localization?



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: HobbesDoo on Feb 27, '09 11:46:15AM

This is caused by Safari 4 for sure. Before it was working perfectly fine. Now all my currency conversions are out. I haven't tried the fix yet.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: Michelasso on Mar 02, '09 06:35:17AM
I'm not sure which Currency Converter you're talking about. I'm using this one:

http://www.palple.net/widgets/currencyconverter/index.html

which does a great job. Highly suggested. It's also in the Apple Store. Is there another one from OSX?

[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: zpjet on Mar 05, '09 12:24:40AM

It is Currency converter within Apple's Unit Converter.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: ginko on Mar 02, '09 11:34:03PM

Having updated my iMac G5 to 10.5.6 some time ago, the currency converter problem did not show up until i installed Safari 4( Beta).
This fix works just fine for me. Thanks for the hint.
My PowerMac G4 with OS 10.4.11 and Safari 3 remained unaffected.



---
rustyboy



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: raviram on Mar 05, '09 02:09:38AM

That worked - thank you.

I had to restart the dock (which controls Dashboard) to see the changes - Activity Monitor, Quit process Dock. It will relaunch immediately and voila - correct conversions!

Thanks



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: Cartoonasaurus on Mar 09, '09 01:00:49PM

Great! I rely on this aspect of it and the fix worked fine. What a weird bug, huh?



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: grueni on Apr 28, '09 03:38:05AM

thx GREAT - I was too lazy to search for the reason, but I use the Converter quite frequently... I too use 10.5.6 and Safari 4



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: mrkgoo on May 22, '09 02:56:03PM

This was fixed in 10.5.7 (I waited). Just curious if it broke this for those that edited.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: Sesquipedalian on May 23, '09 09:29:08PM

Installing 10.5.7 overwrote my hacked version of the widget with the officially fixed version, and it works as intended now.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: Sesquipedalian on May 23, '09 09:35:14PM

I should probably mention that, unlike the suggestion in this hint, I did not put the hacked copy into ~/Library/Widgets, but rather I made a backup of the original and then put my hacked copy into /Library/Widgets.

Those who put the hacked copy into ~/Library/Widgets are probably still running their hacked copies, and can safely delete them because the official version works now.



[ Reply to This | # ]
10.5: Modify the Currency Converter widget's pop-ups
Authored by: tyraconnelluk23 on Jul 26, '09 04:15:49PM
10.5: Modify the Currency Converter widget's pop-ups
Authored by: Roberto123 on Jul 29, '09 01:34:29PM
Updated my iMac G5 to 10.5.6 some time ago, the currency converter problem did not show up until i installed Safari 4( Beta). This fix works just fine for me. Thanks for the hint...

[ Reply to This | # ]