2002-07-30: I've discovered memory corruption issues related to the use of this library module. The module doesn't directly cause the problems, but the fact that it bypasses OPL does. It appears that OPL remembers the variables from the most recently used standard OPL dialog box. When one of these extended dialog boxes is used, the values from it are also copied over the values of the most recently used standard OPL dialog. It appears to be OPL doing the copying and I haven't been able to figure out how to stop it.
To be precise, when an extended dialog is accepted, the values are copied
line-by-line over the values of the previous standard dialog. If the previous
dialog used LOCAL
variables, these are stored on the stack, and
hence the extended dialog will overwrite some part of the stack, almost
certainly causing your app to crash. If GLOBAL
variables are used,
these will simply be overwritten and your app will end up with corrupted
variables.
In light of this, I cannot recommend this module be used. I suspect (but haven't tested) that if all your dialogs use this module then you won't have any problems, as there will never be a previous standard OPL dialog to cause the interference.
dxBUTTNS:
: Standard dBUTTONS
control.dxbInit:
,
dxbAdd:
,
dxbDone:
: Enhanced dBUTTONS
that supports adding buttons one-by-one and also allows for more than
three buttons.dxCHOICE:
: Uses Dynamic Choice Lists
(rather than the limited
OPL strings),
and allows the use of incrementally matching choice lists (think the
'Install standard' dialog in System).dxDATE:
: Standard dDATE
control.dxEDIT:
: A dEDIT
control
that also allows the initial cursor position to be set. Think setting a
new alarm - when you type text, you can set the focus to the control and
have the cursor already at the end of the text ready for the user to
enter the rest of the text.dxFILE:
: Standard dFILE
control.dxFLOAT:
: Enhanced dFLOAT
control that allows the width and number of decimal places to be
specified.dxINT:
: A control to edit integers
without using longs or strings.dxLATLNG:
: A latitude/longitude
editor.dxLONG:
: Standard dLONG
control.dxRANGE:
: A control to edit two integers
forming a range. See usage notes in source code.dxTIME:
: Standard dTIME
control.dxXINPUT:
: Standard dXINPUT
control.There is provision for the dxFILE:
control to return all the
tagged files when I figure it out.
NOTE: Regular OPL
dXXX
controls cannot co-exist with these
dxXXX
controls in the same dialog box. Of course, you can mix
dialogs that use these dxXXX
controls with dialogs that don't in
the same application.
Code written by myself.
dxBUTTNS:
,
dxbInit:
, dxbAdd:
, dxbDone:
only)