From Sprezz Towers

Notes from the workshop.

Technical discoveries, field notes, unlikely bugs and the occasional opinion.

If I was going to go there, I wouldn't have started from here...

For quite some time now people have been asking us to add an RSS feed to the blog and each time they do we mildly regret some of our life choices - especially Blogger. We will be moving to another host at some point but for now... Anyway - frabjous day! We think we've finally done it. Well, AI tells us it thinks we've done it. But ironically you won't know this as you're not subscribed yet! Just look  down at the bottom right of the side bar and we now have a plethora of options, some of which we hope even work!

Read article →

Warning Will Robinson!

I'm sure that we've all had to deal with the sort of user interface where we are working on a data aware form and only want to enable the OK/Save button when a series of conditions (other than simply required which the 4GL can happily enforce) are met. And like me you've probably written a generic validateOKRequirements: subroutine and wired it into every relevant LOSTFOCUS, CHANGED, CLICK event. Tedious, but necessary. Or so I thought. Enter SAVEWARN and SYSMSG. If you're thinking, "Oh I know about that" then please resume normal programming. If, like me, you apparently have been living under a rock for all these years then read on. The SAVEWARN property of the Window is a "Dirty" flag. If it is true then the data on the screen has changed from how it was when it was originally loaded. This is the flag the system checks the generate the "Changes will be lost... Continue?" prompt.  So to enable/disable our own button all we need to do it ch...

Read article →

Rollover Byte-Hoven

We would label this a tricky gotcha but truth be told BUT if it got you you must have had more time on your hands than sense. A recent announcement from Revelation   explained that the <> syntax has been updated - and that due to huge improvements in <>< processing speeds " you can continue using the familiar “<>” syntax for sequential dynamic array processing without needing to rewrite code using LOOP/REMOVE or LOOP/[] parsing patterns.".  Historically nobody in their right mind would have processed the 65,536th element of a dynamic array using <>. If they wanted to get there they'd have used loop/remove. When the Revelation compiler was originally written, the maximum row size was 64K - so the maximum possible populated columns was 32K. So to speed up processing, the compiler replaced a < N > reference to a special opcode optimised for such extractions. Using < N, N > and < N, N, N > don't redirect to this special opcode,...

Read article →

Oui, Ja? Summoning Entities

One of the best parts of the new IDE is that every control type has its own designer: open it in-place, tweak the editable properties, and inspect the repository metadata. We live in these designers every day when we open a form, a program, a popup, or even a menu. What’s less obvious is that there’s also a designer for object code. It turns a lot of “system sleuthing” from writing code to take object code apart into something closer to browsing. To get to it: File → Open → Entity, then choose Stored Procedure Executables. Here's an example of using the designer to look at RLIST Open RLIST and the first thing you notice is how readable fragments are more easily visible due to them being plain text. Once you recognise the layout, that visibility gives you quick signals about what the routine is doing and which external routines it calls. On the right, the ObjectCode Properties panel tells you the basics immediately: RLIST is a subroutine (not a function) and it takes five parameters...

Read article →

Put a lic in - keep on tickin'

OI 10 marked the introduction of a new licensing method, replacing the old `oengine.dll` stamping. Historically, the licensing information was baked into `oengine.dll`. If you wanted to “change” the characteristics of your OI system you could just drop in a different `oengine.dll` and, effectively, you had a new system. OI 10 introduces a separate licence metadata file called `revengine.lic`. It’s a simple XML file that looks like this (with some minor obfuscation): <OI>     <Signature>PEe80-Uf189-5mg27-m1t80-00m4Q-9hih7</Signature>     <SerialNumber>W10280784</SerialNumber>     <NumUsers>10</NumUsers>     <ExpirationDate>2025-05-21</ExpirationDate>     <ExpirationType>0</ExpirationType> </OI> The `Signature` element is the important part. It’s a cryptographic signature over the real licence attributes – serial number, user count, expiry date and type – generated wit...

Read article → 3 comments

A Catalog Of Errors

An old client recently got in contact about the system we had written for them in AREV in the early 90s and subsequently ported to AREV32. Over the years, we had added some bells and whistles including an incredibly specifically tailored OI export utility which we installed about 10 years ago. Just recently, we added another OI export utility, and it was working as expected. But now, the client has reported that when including a specific set of columns, the report just hung - no messages, nothing. Eventually they just had to kill it in the task manager. They wondered if this was in any way connected to the recent upgrade? Now here's where it gets interesting. The columns in question are used frequently throughout the system, displayed on entry screens, reports and the like with no issues, so we thought the client's concern might be justified. We spun up our test system and attempted to produce the report the client was trying to create. Immediately upon selecting the columns in...

Read article →

Regional Accents

Some seven years ago,  REVDEX  documented the then newly introduced concept of #region to allow folding of code. We find this to be incredibly useful when working on large commuter programs as it allows easy navigation between code sections. There's no point in reproducing the linked article, so briefly, you can bracket sections of code between #region  regionname  and #endregion  regionname  and then fold that section of code. Here's an example of one of our commuter routines with the various code sections "regioned". I'm able to see at a glance what a large program does. If I want to look at the supportingRoutines I can just dropdown the "Find label..." combo and select that option The editor then takes me to the line number where that region begins. However, there is a minor caveat to be aware of when we're cutting and pasting collapsed regions. In the following pseudo-code (with a nod to Jackson Structured Programming throwback for those as ancie...

Read article →