These days, computers are amazingly fast. They zip through a few billion instructions per second.
Computers also have a dirty secret. Most of that speed and power is wasted. The typical PC is just sitting on its butt, waiting for something to happen. It’s called an event loop. Did the mouse do anything? Nope. Any key clicks? Nope. System messages? Nada. Did the mouse do anything?…
The reason I mention this is because our staff has been working on dialogs. About 20 were concentrated in one file, so we did those first. The other 100 are scattered everywhere in the code.
The app has a main event loop that runs most things. But dialogs need their own event loop that takes over until you hit Cancel or OK. StDialogHandler was the CodeWarrior way to start the loop. Also the best search word to find dialogs in our code.
When we set up dialogs and windows for Goldenseal in the 90s and early 00s, most only took an hour or two. CodeWarrior had a drawing window to lay out the fields and text. Then we had to write prep work code, plus an event loop with more code inside. Once a few dialogs were finished, the rest could be made with copy/paste and some tweaking.
For TurtleSoft Pro, dialog setup is taking more than twice as long. We had the same problem with Cocoa a few years ago. It’s mostly because newer frameworks hide the event loop. You can run a dialog with just two lines of code, which sounds great. But it requires a control class somewhere else to do anything. That adds complexity, with code in three different places instead of one. Even worse, Qt makes it very hard to copy/paste layouts. Most need to be built from scratch.
Our staff has adapted. Many dialogs are now multi-purpose, covering several functions. Changing text and showing/hiding fields is easier than making a whole new dialog. We probably can whittle the current 119 down to 20 or 30.
After a week’s work, most of the dialogs are done. The ones that are unfinished are big and complicated. We probably can do without some of those, or redesign to make them simpler. The goal is to make the new interface less of a monster. KISS.
Testing TurtleSoft Pro on our own business is next on the agenda. Finally.
Dennis Kolva
Programming Director
TurtleSoft.com