The biggest problem with TurtleSoft Pro right now: screen layouts are ugly. To fix that, we have to work on stream classes. Here’s how that happened.
Our current accounting software was designed for the monitors of the 90s and early 00s. Showing an estimate on a 640 x 480 VGA screen was a tight squeeze. Layouts used small fonts, and we agonized over every pixel.
These days, 1920 x 1080 is typical, and monitor sizes go up from there. Lots more room to play with. Pixels also have grown smaller.
Right now, TurtleSoft Pro still uses the original screen layouts from Goldenseal. Layout data is stored in resource files, then translated by a stream class. The stream reads bits and bytes, and uses them to decide size and location for each field, button and caption.
Unfortunately, the old layouts are not designed for a modern GUI. Captions don’t line up neatly, because fonts are different, and bigger. Fields are too close together. Stuff overlaps when it shouldn’t. Screens are cluttered and ugly.
The cure is to get Custom Layouts to work, so we can tweak the appearance to look good again. Last March we finished its basics. Click the Layout button and it draws the screen in edit mode, and lets you drag fields around or resize them. Now we need to save those changes, and turn them into resources so the app looks better out of the box.
In the early days of Goldenseal, three different programmers worked on Goldenseal in parallel. Each of them wrote a stream class to move different types of data. The PowerPlant framework also had its own streams. So did the NeoAccess database. Later, the C++ language added yet another set of basic stream classes. The result was a mess. A flood of streams, as it were.
Data streams are complicated. They can travel many places, in either direction. They might read from a file, or write to it. The file might be text, or binary data. Sometimes streams use a memory buffer instead of a file. Over a network, they move data via TCP/IP sockets. Each stream type has its quirks.
When our staff updated the database code to 64-bit back in 2015, we rewrote some of the stream classes, and deleted some. The past couple weeks we deleted a few more, and rewrote others. Along the way, we also updated network streams, in prep for the multi-user version.
In general, streams are more orderly now. When you revise a layout, it now uses one to save changes into a database record. Sadly, something is wrong. Changed layouts are totally wacky. It’s probably due to the fact that PPC Macs were ‘big endian’. So are all the Goldenseal layouts. Intel and M1 chips are ‘little endian’, which means they write bytes in a different order. We have code to swap between them, but it’s easy to screw it up. We need to step through a lot of data until the bugs are visible.
It probably would be better design to use simple text for layouts, instead of raw binary data. Easier to edit and debug, and generally less fragile. It’s tempting to make that change now, rather than futzing with big/little byte orders. However, it may take weeks to redo it all. Tough decision.
Dennis Kolva
Programming Director
TurtleSoft.com