tipstrs -- Tips, tricks, and hints on categorized subjects
Product research made easy, visit eDistiller today!.

What & Why

rpnCalc is a reverse polish notation (RPN) calculator. The stack behavior is based, rather loosely, on the HP-28S. I originally wrote it because the battery on my HP-28S died and I needed a calculator. Yes, I suppose I could have bought a new battery. But instead I wrote an HTML/Javascript/CSS RPN calculator; partly out of need, and partly as an exercise in Javascript.

With the release of Tiger (OS X 10.4) on the Mac, comes the new Dashboard feature. This is actually a pretty cool feature and, much to my surprise, the dashboard widgets are created using HTML/Javascript/CSS. Since I like learning new things, I took my existing code and made the modification needed to turn it into a full-fledged widget.

I find it useful, I figured, perhaps incorrectly, that others might too. So here it is, an RPN calculator widget for the world at large.

Looking for a version for the iPhone or iPod Touch?

We've created the BigStack RPN Calculator which is based on the RPN Calculator widget. It's available on the iTunes app store (link will open in iTunes).

How to Download

For all the details on how to use widgets, consult the documentation on your Mac. Basically, you need to be using OS X 10.4 or higher. Click the icon below. If you are using Safari, the widget will install automagically. If you are using another browser, you'll need to unzip the downloaded file (which will then be called rpnCalc.wdgt) and put it in your /Library/Widgets directory. Then, when you start your dashboard you'll see the icon for the rpnCalc widget (shown below), drag it on to your dashboard and you are good to go.


Download

Other Widgets

Check out my other widgets:

Copying from an OSX widget

rpnCalc offers commands which allow the stack values to be copied onto the clipboard. This functionality makes use of the pbcopy system-level command. So far as I can tell, there is a bug with this command. Sometimes when the copy occurs, it doesn't actually work. What I've found is that if I am in an application, I copy something from that application, and then I copy something to the clipboard from rpnCalc, if I then try to paste the rpnCalc result into that application it will fail; instead of pasting the newly copied content, it will paste the content previously copied in the application.

But there is a way to make it work. When this happens, go into another application and paste. You should find that the rpnCalc result is now pasted. If you then go back into the original application, if you now paste you will get the result from rpnCalc. Yeah, this is kind of lame, but it's the best work-around to the problem that I have found so far.

The Legal Mumbo Jumbo

This Software is freeware. I make no claims about it's accuracy or fitness for use. On the upside, you are free to use it in any way you see fit; I won't even take your donation, much less ask for it. In addition, you are free to use the code in anyway you like. Modify it to make your own calculator, use it to learn something about dashboard widgets, the possibilities seem endless and magical.

As part of the deal, Apple asks that I tell you the following...

Mac OS X v.10.4 Tiger is required. If you're using Safari, click the download link. When the widget download is complete, show Dashboard, click the Plus sign to display the Widget Bar and click the widget's icon in the Widget Bar to open it. If you're using a browser other than Safari, click the download link. When the widget download is complete, unarchive it and place it in /Library/Widgets/ in your home folder. Show Dashboard, click the plus sign to display the Widget Bar and click the widget's icon in the Widget Bar to open it.

Change History

For the history buffs amongst us, here is the content of the change log: