Focus (Aug 29)

Last week, our staff spent a few days getting the old networking code to compile for 64-bits. A contractor will do the Qt work for the new multi-user versions, but we need to update some parts on our end, first.

The rest of the week, we mostly futzed with the basic interface for our new accounting software. It’s all the little stuff that you probably don’t even notice, except when it isn’t done right.

Some of the work was the usual interface perks: keyboard shortcuts, pull-down menus, handy buttons. Usually Goldenseal has several ways to do stuff, and we hadn’t filled them all in yet.

We faced one interface issue that’s called focus: what gets the message when the mouse clicks or the keyboard clatters. Focus can be complicated. When you use the scroll wheel, does it move the cursor inside a field, or the window contents? Does the Return key add a carriage return inside text, or save a record? How about the Enter key? Tab key? Shift-Tab? Control-Shift-Tab? It takes a lot of tweaking to get the “look and feel” to be right.

The framework we used for Goldenseal (PowerPlant) was primitive. We had to write all the focus management from scratch.

The frameworks we have used since then (Cocoa, MFC, and now Qt) include built-in handling for focus and other basic interface. That is not always a good thing. Sometimes the hidden behavior is wrong, and hard to change.

For example, we spent several programmer-hours on a very simple problem. After leaving a multi-line field, there still was a flashing cursor in the old field, plus one in the new field also. Having two of them looked weird. It was confusing. None of the obvious fixes worked. We finally had to set the cursor width to zero on exit, then back to one on return. It’s an ugly fix, but we didn’t find anything better.

Focus is part of a bigger problem, and not just for TurtleSoft. Apple and Microsoft keep getting further apart, which makes it harder and harder to write code that works on both. Frameworks like Qt help, but it can still take years to build a good interface.

To speed things up, many companies have turned to Electron. It builds desktop apps using web tools: Javascript, HTML and CSS. Using those simpler languages sounds great in theory. They’ll make an app that looks just like your website. You can hire less expensive programmers, and have just one code base.

Electron may speed up app development, but with some catches. Apps are huge, since they include a whole built-in web browser to run the code. They use a lot of RAM, and tend to have an awkward user interface. Web pages are not very good at small details like focus. HTML and web browsers have come a long ways, but they still can’t deliver as comfy an interface as real desktop apps.

Cheap/fast/good.  Pick any two.

Dennis Kolva
Programming Director
TurtleSoft.com

Pretty Layouts (Aug 22)

Our staff spent most of last week making layouts look better in our new accounting software. Screens are wider these days, so we put more space between fields, and enlarged them a bit.

Over the past year, our staff already added tweaks here and there, for things that looked really bad. The problem was, they were in several different places. Sometimes a new fix would break an old one, or make things worse. Sometimes it would just not work. So we moved everything into one place: AdjustPaneForPro.  It tweaks the current layouts from Goldenseal, but won’t touch anything in future updates.

Getting printing to line up was especially frustrating. No matter what we did, things stayed wacky. We finally tracked down and removed all the printing tweaks. With those gone, printed forms looked OK again, but too small. A simple multiplier of 1.33 was all it took to fill the page properly.  I have no idea why Qt needs that adjustment. A few small tweaks after that, and it now prints decent business forms.

The first release won’t have a way to edit layouts. That’s why we are doing so much fiddling. It lets us keep using layouts from Goldenseal. Fonts, pictures, colors and text are very different, these days. It will take several months to deal with all the changes. Better to tackle them in the version 5.1 update.

Anyhow, the tweaks are worth the the time it takes to code them. Setting up the layouts for data entry screens, printed forms and reports took a full person-year of work in the 90s. We don’t want to do that all over again. A few lines of code to move every popup by a couple pixels is a lot easier than doing it by hand.

TurtleSoft finally has started to use the new app to run our own business. Right now, everything happens twice: once in the new app, then again in Goldenseal. If they don’t match, we fix it.

There still are bugs and unfinished items. But, the code is far enough along that we can rewrite it fast enough to keep up with daily business.

There still is one last, big thing that hasn’t even been started in the new accounting software: networking. Like almost everything else, the old code was obsolete.

Qt has good networking classes, so the new version will be much better. Users will be able to sign in over the Internet. Future small phone apps will also connect. We are talking with subcontractors now, to help speed things up.

The multi-user versions probably will be ready at the same time as the rest of the app. Best guess still is late 2022.

Dennis Kolva
Programming Director
TurtleSoft.com

 

Pictures (Aug 15)

The current Goldenseal accounting software stores images as PICT. It was a very good format, popular for a couple of decades. PICT can include bitmaps, and also MacDraw-style vectors. Sadly, it’s obsolete now. Apple abandoned it completely in their 64-bit versions.

The Qt framework that we use for our new accounting software can’t read PICT. We didn’t find any C++ libraries to convert PICT to newer formats. It’s not worth the several months it would take to write the code from scratch. So, hacks and work-arounds are needed to move graphics from Goldenseal to the new accounting software.

Goldenseal stores graphics data in several different places. Some are resources inside the app: icons, pictures, and graphics inside layouts. Our staff moved those built-in PICTs last winter. We had to take screen shots, save them as files, embed them inside the app, and convert ID numbers to file paths to access them. The pictures for estimating dimensions were especially tricky.

Users can also paste pictures into the company file. Last week we set up a way to show most of those user-created PICTs. Printed forms and data entry screens now show pictures that were pasted into the layout. They also show your logo, pasted into Company Info.

The solution is hacky, but it should work for most users. You’ll need to save your logo into a file called TSLogo.png, and put it in the Documents folder. Save any other graphics as TPPicture-106.png (for printed forms) or TSPicture-106.png (for data entry screens). The number is different for each class of record. We’ll publish a cheat sheet so you know which to use.

It’s not an elegant system, but it’s good enough for a temporary fix. Graphics will be easier after we rewrite Custom Layouts. That won’t be in the first release, but it won’t take too long to finish it.

One little-known feature in Goldenseal is picture fields. A few types of records let you paste in a PICT image that is stored in the database. Sadly, we don’t have any way to move those into TurtleSoft Pro. To save them, you can take screen shots, then save those as files elsewhere. There also are websites that will convert PICT to newer formats.

In a future update, the new accounting software will link to exterior files of all types. For now, we’re just trying to make old data work OK.

Sometimes progress is painful, especially on Macintosh. I lost blueprints and many other useful files made by apps that are dead. This summer, I talked with a couple of scientist friends who have years of data in old Mac formats, now lost forever.

Hopefully the pace of progress has slowed a bit. It will be nice if this next generation of pictures and data can last longer.

Dennis Kolva
Programming Director
TurtleSoft.com