RISC World

A Secret History of DrawWorks Part 5


Last issue I was left with a small problem. The new versions of RISC OS Select being produced by RISCOS Ltd, didn't work with DrawWorks. Note that as far as I was concerned it was Select that didn't work with DrawWorks, not the other way round, an ego is a wonderful thing. The entire iSV catalogue had also been passed to APDL, although I was still responsible for some of the maintenance.

The first concern we had related to what other changes RISCOS Ltd might want to make to Draw before producing a final release. We didn't want to produce a new DrawWorks designed for Select until we were sure that no more changes were going to be made to Draw. So despite the increasing calls for a new DrawWorks the decision to wait was taken.

Eventually in mid 2002 we were happy that RISCOS Ltd were not going to make any more fundamental changes and work started on the new DrawWorks, to be called DrawWorks Select, taking DrawWorks Third Millennium as the basis. The first task was to map out all the new menu positions from the Select version of Draw. As users will no doubt be aware a number of things moved around the Draw menu tree. The changes were all highly sensible and highlighted how badly designed Draws menu structure had become over the years. As an example both the zoom and grid options had now moved to a submenu, where they should have been since 1988!

DrawWorks needs to know where all the items are on Draw's menus so that it can "fool" Draw into thinking that a user has clicked on a menu entry, even though in reality it's another program performing the actions.

The modular structure of DrawWorks meant that it was quite easy to add a new routine inside DrawWorks that mapped the old menu locations, to the new locations if a Select version of Draw was being used. In the end, and much to my relief, calls to this new routine only had to be inserted in four places in the entire DrawWorks application. The result was a version of DrawWorks that at least mainly functioned under RISC OS Select. I then had a small brain wave, instead of re-coding the module that controls Draw features not accessible directly from menu clicks, why not simply use the same menu mapping before calling the module? This saved a considerable amount of time. The final stroke of good fortune was finding that although the position of Draw's indirected data used for menus had moved, the data order hadn't. All that was needed was a new memory offset to start from.

The end result was that after only a few days work I had a version of DrawWorks that ran correctly on RISC OS Select. All the features worked, this was now renamed as DrawWorks Select V 4.01. I then designed a new logo for the program, as well as fixing a few long term bugs and tidying up a few things that I had never been happy with. One of the most amazing bugs related to the metric grid spacing/subdivision controls in DrawWorks, these were totally faulty because I had copied data from the Imperial menu structure! Out of interest I went back through the old versions of DrawWorks, the same bug was present in all of them, so this options had never worked since it was introduced. Even funnier was the fact that nobody had ever reported it either.

This version was then finally sent to Dave Holden at APDL for him to have a look at.

Dave then improved the configuration settings and as an aside made a few "unimportant" changes to tidy the program up a bit further and sent it back to me. It no longer worked properly, help! I then spent ages trying to work out why. I didn't want to undo all Dave's changes as some of them were essential, especially being able to specify the location of !Draw. Those with a perverse mind might like to have a look at the two small changes made that broke DrawWorks. Dave Holden's change is top each time, with my comment underneath.

DH: New OS variable DrawWorks$Running instead of using DWD$Dir.
AT: Put back the DwD$Dir variable as its needed to prevent Draw loading new templates when Dworks not loaded.

DH: OS variable DWD$skin removed (can't see it used anywhere).
AT: Put back the DWD$Skin variable as its used in the !Draw run file

Dave also made a sensible change to a variable used in several places inside DrawWorks. The variable was handled badly in a number of places, and Dave had corrected this. Unfortunately I had already noticed my slack programming and had compensated elsewhere, but had neglected to document the fact, whoops. This caused several days of hair pulling before doing a comparison on a working and non working version revealed the change. In my defence I would like to point out that although I didn't document my low quality programming in the first place, Dave didn't document his "fix" either. So slapped wrists all round.

Finally we had a working DrawWorks Select, with new configuration options, that we were both happy with. It didn't have any new features, but had a number of bug fixes, and ran on the latest version of RISC OS. What we didn't know was that RISC OS 5 and the Iyonix were round the corner...