Friday, June 26, 2009

Fixing a Yahoo Widget

I managed to fix a bug in a certain Yahoo Widget.
I am a fan of Yahoo Widgets for their clean look and generally good performance.

One particular widget has been a favorite of mine for sometime, because it does one task extremely well. However, it had one flaw. To display the text color correctly, it seem to rely on a set of deprecated Unix system calls. The bug/error was manifested when you tried to change the text color. The only text color it supported was Black _IF_ you did NOT have the Yahoo Unix Utilities installed.

Today, I downloaded the widget and then spent some time reading around the Yahoo Widget developers' section. The reference manual allowed me to find the valid replacement code. It was a two line fix. Remove one line of an old system call then add two lines of code to implement the new API call.

Since Yahoo widgets are just a repackaged compressed/zip file, extracting the code, changing the command repackaging it was simple. :) I was done in <20 minutes. I now have a working widget, that does NOT depend on the Yahoo Unix Utilities. Yay!

No comments: