Years ago I began experimenting with OS X development for Console Calculator, as I use OS X personally. To be honest, I can’t stand using Xcode to design an interactive GUI. I find it confusing an non-intuitive for one. The NIB files and Interface Builder seem particularly convoluted with all their controllers, and control-click to drag objects to connect them together. Are events and callbacks so bad?
Even though I had mostly separated the calculator engine from the GUI, it was going to take a LOT of work to get a fully featured OS X version of the GUI and and running.
I started thinking about going with a cross-platform development kit, so I looked into a few. wxWidgets had some nice things going for it, but I also gave FLTK a try and found developing with that toolkit was easier and produced smaller executables.
FLTK stands for Fast Light ToolKit. It’s free. Here’s the skinny from their site:
FLTK (pronounced “fulltick”) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation.
FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes.
I found it really easy to pick up, documentation is good (if you use google to find it, their website is a mess), and their sample applications are great way to learn the ropes. I had a simple console calculator GUI up and running in just a few hours. With a cross platform toolkit, I figured the examples wouldn’t work “out of the box” on OS X as they would on Windows, but I was wrong. Xcode project files were included, and the sample applications compiled right away. No hours spent to read install READMEs and googling for compile errors. Nice.
So I spent a few more hours to make it actually a useable program, and released the half-baked version for download. It’s got the same calculator engine as the Windows version, so it is fully featured in that regard, but no GUI support for changing any of the settings yet, no saved variables or functions. To get it on par with the Windows version will take many more hours, and unless someone wants to sponsor further development, I’m in no rush.
Try out Console Calculator for OS X. I would like to hear some feedback from people… the GUI doesn’t use native OS X controls, so it does look a little out of place. The menu bar is in the application window, etc. Could use some polishing, but works for me.