Jump to page content

Bug of the moment 2006-02-15


I was playing Sweeper on my Revo in the café and when I completed the level, I was rather surprised by the message box that appeared:

*blinks* Press the escape key to continue? How does that make sense? I had instinctively pressed enter to dismiss it, and nothing happened, so it was not even a misprint.

While playing around with random crud on my RAM drive, I encountered a program with a dependency problem:

Now I was getting disturbed. I was not aware of any EIKON convention that insisted that Continue use the escape key, but why were two different programs behaving like this? Sweeper is open source, so I tracked down the offending line of code, which turned out to be a call to ALERT(). ALERT() is an OPL built-in which I looked up in the manual, defined thusly:

ALERT

Usage: any of

r%=ALERT(m1$,m2$,b1$,b2$,b3$)

r%=ALERT(m1$,m2$,b1$,b2$)

r%=ALERT(m1$,m2$,b1$)

r%=ALERT(m1$,m2$)

r%=ALERT(m1$)

Presents an alert – a simple dialog – with the messages and keys specified, and waits for a response. m1$ is the message to be displayed on the first line, and m2$ on the second line … Up to three keys may be used. b1$, b2$ and b3$ are the strings (usually words) to use over the keys. b1$ appears over an Esc key, b2$ over Enter, and b3$ over Space. This means you can have Esc, or Esc and Enter, or Esc, Enter and Space keys. If no key strings are supplied, the word CONTINUE [sic] is used above an Esc key.

I am at a loss as to why OPL decided to do something this dumb. I am yet more amazed as to the superlative quality of software that I have seen developed in OPL in sheer spite of its crippling limitations and innumerable design flaws. Just do yourself a favour and re-implement ALERT() using a hand-rolled dialog and get rid of this nonsense!

While we are on the subject of programming, here is a little dingbat from REAL in REALbasic 3.5.2:

A curious flaw in the object model used in REALbasic, where class ContextualMenu is a descendent of class Control. Which is odd as not all controls in a window are going to want to have things dropped on them. REALbasic however is quite happy to let you drop stuff onto scroll bars, sliders, radio buttons, spinny arrows, just about anything really. And contextual menus. Press escape to continue.


Posted 15th February 2006 – Comments and questions?