Custom Layouts Progress (Jan 30)

A few weeks ago, work on Custom Layouts stalled out. So our staff started over, and used a different part of the Qt framework. That went much better. It took a week of catch up, then things began to zoom along. Using familiar code really helps.

Most of Custom Layouts now works properly in the new accounting software. The whole MacDraw-like interface works. It sets colors, text formats and tab order. It aligns edges. Layouts save in the new text format.

It’s good enough to tidy layouts for screen shots and videos. It’s almost good enough for a version 1.0 release. We’ll finish final details during testing.

There will be a few changes in Custom Layouts.

The biggest is the way you access it. Just click a button to change the current data entry screen. No need to wade through submenus. Users will probably do more customizing, because it’s right there.

For borders around fields, Goldenseal sets left/right/top/bottom separately. That is hard to do in Qt, so color and line thickness will apply to the entire border. Date fields will have underlined text instead of a partial border.

The built-in dialog for text formatting is very fancy. It has strike-through and underline colors, shadows, etc. We probably will only use basic fonts, sizes and styles, and ignore the rest. It would be nice to have a simpler dialog, but building one from scratch is too much work.

Colors are also fancier. Goldenseal uses just 256 colors for most things. The new accounting app will have millions of choices, plus transparency. It’s overkill, but that’s the easiest way to do colors, these days.

Meanwhile, the website overhaul is also in good shape. Most duplicates and obsolete pages are gone. The whole site is better organized. We still need to double-check every page, but that is one step in the testing process.

Right now, our staff is working through the Answers button pages, starting at A. Tidy the text, and check the app to make sure it works as promised. That’s our life now, until Z.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

 

Frameworks, Languages & Debuggers (Jan 20)

Qt is the sixth framework that TurtleSoft has used to make estimating and accounting software. First was Excel spreadsheets and macros. Then HyperCard for a couple of estimating apps. Then PowerPlant, Carbon and MFC to build Goldenseal versions 1.0-4.96. Now Qt for the next generation.

The first two used their own built-in programming languages (Excel was Fortran-ish; HyperCard was SmallTalk-ish). Everything since then is written in C++.

There have been duds along the way. We prototyped Goldenseal in Think Pascal. The switch to C++ was a good decision. Cocoa and Objective-C were the opposite: we wasted three years on those. At least a dozen other frameworks didn’t pan out, over the years. Luckily, their fatal flaws usually were obvious within a month or less. Sometimes just days.

Every framework has its quirks. A hefty portion of our staff’s time is spent learning their weird details. That work often happens in the debugger.

It would be nice if debuggers lived up to their name, and actually removed bugs! Sadly, humans still have to do all the work. The debugger just a useful tool that shows what’s going on inside the code. It shows the sequence of what called what. It lets you step through the code, and shows values along the way. Debuggers save many hours of frustration.

This week, the new code for field drags in Custom Layouts was wacky. Fields kept flipping back and forth between two different locations. Drags are hard to debug, because the mouse stops moving when you interrupt the app. We had to fill the log window with diagnostic text, instead. Eventually, that led to a fix. It was caused by one of those Qt quirks when it’s run on a Mac.

Despite the detours, the new approach to Custom Layouts is moving right along. Another couple weeks probably will get it functional.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

Dancers & Custom Layouts (Jan 13)

On Monday, our staff finished work on the online Reference Manual for the new accounting software. Next on the list: triage the remaining site pages. Some go on the double-check list for the new app. Some move into the Reference manual. Most get a quick deletion. When that’s done, the new site will be very tidy.

All this recent website work has been useful. It turned up many small bugs and missing details. It also inspired a few interface improvements.

Also, there’s another reason for doing so much web work now. Our office is on the 4th floor of a circa-1890 office building. It’s not very soundproof. Last November, a dance studio moved in right below TurtleSoft. Before that, it was business offices or vacant.

Programming needs intense focus. It’s easily killed by distractions. Website work and testing are the best we can manage while there’s clomping feet and music downstairs. For tap dance, we need to leave the building or go nuts. Fortunately, classes don’t run full-time. Our staff still can program while it’s quiet.

Along with bug fixes, the main focus right now is Custom Layouts.

Qt has a nice sample app with boxes you can drag around and resize. A couple years ago, we started with that code for Custom Layouts. It only took a few weeks for it to look decent, and kinda work like it should. That’s where we left it until last December.

Getting the code good enough to replace Goldenseal has been much harder.

We use Qt Creator for design, coding and debugging. One component is a drawing window to set up dialogs and windows. It’s similar to Custom Layouts, but worse. You can’t nudge things with arrow keys. There’s no way to align fields. Shift-clicks don’t work. Double-clicks do nothing. It’s easy to accidentally select the wrong thing. The new Custom Layouts was like that, too.

Fixing those problems has been difficult or impossible. I think Qt Company wrote QGraphicsScene to make a good enough form editor, but didn’t make it expandable beyond that.

A few years ago, we set up Custom Layouts in Apple’s Cocoa framework, and had a similar problem. Their form editor also sucks. Our code also stalled out when trying to improve it.

You’d think that big companies could do a better job on their tools. It’s not like TurtleSoft invented anything new: we just copied the interface from MacDraw. Decent box-dragging has been around since the 1980s. Maybe the difference is that we use Custom Layouts a lot. Programmers at Apple and Qt don’t eat their own dog food.

Rather than settle for a mediocre interface, we started over. The new version uses the same code that already works for data entry screens and reports. Those have full control over mouse and keyboard actions, so we definitely can make it work well for layouts. As a bonus, the code is simpler now. QGraphicsScene had baggage that’s now gone.

It’s not fun to toss a couple month’s worth of work, but that’s part of the creative process. We’ve done it plenty of times before.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

Qt and Mac OS (Jan 6)

The Qt company recently made the decision to drop support for OS 10.15 Catalina in their next update. They say it’s because Apple moves so fast. The changes makes it too hard for them to support a wide spread of versions. The latest plus two older ones is the most they can manage.

What makes it more complicated is that Qt launched a major 6.0 rewrite in December 2020. The first few decimals of that were buggy and missing features. It’s pretty good now, but still not fully mature.

To run native on M1+ Macs, we will need to use the latest version of Qt for our new accounting software. Qt currently is at 6.4.1, but it probably will jump another decimal or two before we are ready to move over.

Right now, our staff still uses Qt 5.15. That’s a very stable version from before all the 6.0 changes. It runs fine on OS 10.14 Mojave. Our staff needs to use that version right now, because it’s the last one that runs 32-bit Goldenseal. Running new and old apps side-by-side is essential for testing and design.

Our original plan was to support Mojave and newer. That is still possible, but it will take at least two different apps. Most likely, we’ll build one with Qt 5.15 that will work for all Intel Macs with Mojave and newer, plus another using Qt 6.5 to run on M1-series Macs.

Apple’s current once-every-year update cycle may mean that we’ll need to build more than two versions, some time in the future.

Apple’s business model is to move fast and break things. They end support for older versions very quickly. The speed works fine for companies like Microsoft and Adobe, since it just creates upgrade income from their users. For everyone else, not so much.

Meanwhile, the new online reference manual is up to Small-Job-Estimating. There isn’t much after S and T, so our staff probably will finish it next week.

Updating the manual over the past couple months has turned up many bugs. Some were possible to fix on the fly, but many are waiting for more serious testing. That will be easier with the online support pages to act as a guide.

Dennis Kolva
Programming Director
TurtleSoft.com