Adventures in Upgrading
Getting Ancient Code to Work in Xojo
Issue: 11.5 (September/October 2013)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 26,903
Starting Page Number: 49
Article Number: 11509
Related Link(s): None
Excerpt of article text...
By far the most complicated program I've written is my Z-Write word processor. I started that in 1998, back when "Xojo" wasn't even a gleam in Geoff Perlman's eye. That was back in the days when Apple was "beleaguered" and Steve Jobs had only just returned to rescue the company.
Since then, we've had the switch from OS 9 to OS X, the move from PPC to Intel, and most recently, the whole move to mobile, with iPhone and iPad. A lot has changed.
Except for my Z-Write code. Most of it was written in the late 90s, and it's pretty bad. I didn't have a clue what I was doing and REALbasic was limited in terms of language features (there was no
dictionaryobject, for instance).
I planned a complete rewrite, but that stalled when I quit my day job and started publishing this magazine. This thing took a lot more time than I'd expected, especially at first, and Z-Write has stagnated. For a while I faithfully moved it up the REALbasic upgrade chain, but I stopped with version 2007r4, the last version that supported single
.exefiles on Windows. I'd had ideas of making Z-Write cross-platform, but I didn't like the DLL folder aspect of a Windows version and requiring an installer.
And that's where Z-Write has stayed. I've been updating it—the new version has been in beta for years—but I was afraid to move it beyond 2007r4 as I didn't have time to fix anything that might break. At first this wasn't a big deal, as I was only a year or so behind the current release, but suddenly many years passed and I really wanted to use some of the new language features and improve my code.
I was also running into other odd problems. For instance, last summer when I wrote about Mountain Lion's code-signing ("Getting Past the Gatekeeper" in issue 10.6, page 38), I discovered that code signing wouldn't work with my Z-Write app. It turns out that Real Studio apps didn't include the necessary structure for code-signing until version 2008-something. That means that if I compile Z-Write with 2007r4, it cannot be code-signed and many users might have trouble launching it (they'll get the ominous warning message shown in Figure 1 that the app can't be validated as being from a known developer and many will be afraid to run it).
...End of Excerpt. Please purchase the magazine to read the full article.