This week our staff shifted gears again, and started work on Estimates. They have the most complicated interface in our estimating/accounting software, so it makes sense to tackle them now. Most likely it will take a few passes to get all the details finished.
The main estimating window has a row of buttons for dimensions, each with a small picture/icon. The first task was to get the icons to appear onscreen.
For 32-bit apps like the current Goldenseal, Macs store icons as resources inside the application. Our Windows version does the same, with the help of Apple QuickTime. Newer 64-bit frameworks take a totally different approach. Icons are now in regular graphics files, accessed with a URL. It’s just some text than can point to a web page, a file on the hard drive, or a resource file that’s buried inside the app.
Years ago, our staff used ResEdit to draw the Goldenseal icons, pixel by pixel. It took a few months, so we definitely don’t want to do them again. Fortunately, it wasn’t too hard to convert icons into the new URL format. We took screen shots, cropped them, then saved them into a couple hundred individual files.
There’s also another change: every resource used to have a ID number, but now it needs a file name and path. To handle that, we wrote a translator that links the old resource IDs to the new URLs. The icons now show up properly.
Larger pictures are more complicated. Right now, Goldenseal stores them inside the layouts as a PICT image. PICT used to be one of the most popular graphics formats, but now it’s totally defunct. Modern programming frameworks use .png, .jpg, .gif or .pdf files instead.
The only layouts with PICT images are in estimate dimensions. We’ll have to cheat and write one-time C++ code to place those correctly. Eventually we’ll add interface so users can paste in new images and move them around.
There’s one more place where the loss of PICT is an problem. Goldenseal lets users paste images into optional picture fields in some records. They are stored inside the company file as PICT data. So far we have not found any way to use them in Goldenseal Pro. Those images are in a dead, foreign language.
In the future, Goldenseal Pro probably will store user images as files in a folder somewhere. It’s more future-proof than adding raw data to the company file. Also, it will allow users to store scanned images and other big files, without making the company file enormous. The downside is that separate files can get lost more easily. URLs are great if nothing ever moves, but that’s asking a lot.
Updating our code to the 2020s takes effort, but it does have benefits. The URL system makes it much easier for us to open and save files. Not just the main company file: there’s also contracts, imports, exports, Save As Text. In the current Goldenseal, doing anything with files requires many lines of code and weird data structures that change every few years. Now it’s just a line or two and a simple URL.
We haven’t investigated the networking features in Qt yet, but the URL system probably will make that easier, too. It may help us create the ideal multi-user version: enter an IP address, and log into your company file over the web from any device.