Goldenseal Pro Progress- Breakdowns & Smart Fields (Feb 2)

Our staff started work on breakdown tables last week. After two days, they already looked great. Values filled into cells. Text was editable. General appearance about the same as our current accounting software. Even better, the code (QTableWidget) was easy to understand. It got the job done without too much sweat. That is a very, very good sign.

It took a month to get to the same place using Cocoa for Macintosh. NSTableView has many built-in features, but it is complicated and hard to adapt. There were many quirks to overcome.

MFC for Windows was even worse. They don’t have a built-in table class at all. We found a few libraries to make a grid of cells, but they were ancient and buggy. So we started to write a table class from scratch, but then the pandemic hit. The break gave us time to realize that MFC was just not going to work out. It’s too old, and too creaky. Hence the pivot to QT.

Breakdown tables are not completely done in the QT version, but they are good enough for now. We’ll come back and finish them later. The plan is to get past all the potential deal-killers at the beginning, before investing too much time.

Next on the list is smart fields (called clairvoyant fields in the current Goldenseal). Those have a popup button that shows a list of projects, vendors or whatever. You can click the button and choose one. Or you can tab into a field and type the first few letters, or start typing then choose from a scrolling list. It’s ideal for accounting software, where everything links to other stuff.

The basic design for smart fields came from Bruce Tognazzini at Apple, one of their human interface gurus. He called it a disambiguating field.

Cocoa has something called a combo box. It is similar, so at first we thought it might be Tog’s design brought to life. We fiddled with NSComboBox for weeks before realizing it wouldn’t work. Close, but users could type in things not on the list, and there was no way to prevent it. No good way to deal with it. We ended up building smart fields from three components, just like in the current Goldenseal. There’s a text field, a popup button next to it, plus a scrolling list that pops down when you start to type.

MFC also has combo boxes, but with the same basic problem. QT has them too, but they are even less adaptable than in Cocoa or MFC. Being worse was better, since it was obvious they’d never work. We didn’t waste time trying.

This will be the 4th time we build 3-part smart fields, so it probably won’t take very long to get them working.

Breakdown tables use smart fields. For example, for each line item in an estimate there are three: Category, Subcategory, and Cost Item. Each row in a construction estimate can show all sorts of stuff, so the code to manage them is very complicated. It’s a collision of many complex things.

In the Cocoa version, we never managed to get smart fields to work properly when in tables. The eventual solution was to have a pop-up window to enter each line item, instead of doing it inside the table row. That turned out to be a nice interface. We may use it for the QT version also. Not so cramped as working in little table cells.

If QT is very cooperative, we could do it both ways. Then users can choose which they prefer.

Dennis Kolva
Programming Director
TurtleSoft.com

Author: Dennis Kolva

Programming Director for Turtle Creek Software. Design & planning of accounting and estimating software.