Dec 232017
Turbo Pascal 5.5 OOP routines that include Dbase III File routines, with extended data entry screens.
File TP_DMX21.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Turbo Pascal 5.5 OOP routines that include Dbase III File routines, with extended data entry screens.
File Name File Size Zip Size Zip Type
DBENTRY.PAS 2320 922 deflated
DMX2.TPU 52224 21490 deflated
DMXAMORT.PAS 7928 2422 deflated
DMXAMPLE.PAS 1818 843 deflated
DMXDFILE.PAS 8173 2155 deflated
DMX_FILE.PAS 2277 592 deflated
READ.ME 10913 3643 deflated
TVIDEO.OBJ 774 522 deflated

Download File TP_DMX21.ZIP Here

Contents of the READ.ME file

DMX Data Entry Matrix 2.1
(C) 1990 Randolph Beck

DMX is a Turbo Pascal unit designed to manipulate data entry screens.
This is extremely flexible and powerful. You can further enhance its
usefulness through creative use of object-oriented programming.

We have used this system for more than just data entry. DMX can also
be used to create text listers, tables, smart help screens, and more.

DMX requires Turbo Pascal 5.5 or above.

Trademark acknowledgements:
Turbo Pascal is a trademark of Borland International, Inc.
dBASE is a trademark of Ashton-Tate.

This is a shareware product and may be distributed and copied for free,
providing that no profit is made through such distribution.

Users may register their copy by sending $12. Registered users will
receive a diskette with the most recent version of the DMX TPU files;
associated program units; and documentation of its internal functions.

The registered version will include full access to the many internal
procedures and functions which make this system work.

Registered users can also order fully documented source code for an
additional $35.

Randolph Beck
DMX Registration
P.O. Box 560487
Orlando, FL

Business and government organizations are required to register in
order to continue to use this system.

No run-time fee is required for compiled code.

Files included:


DMX2.TPU Main DMX unit (2.1)
TVIDEO.OBJ Required for compiling with DMX2.TPU
DMX_FILE.PAS Source code for the file-handling unit
DMXDFILE.PAS Source code for the dBASE file-handling unit

DMXAMPLE.PAS Source code for the simple example
DBENTRY.PAS Source code for the dBASE file demo

What has changed since DMX version 2.0?

The video procedures were trimmed down. The old system was sensitive
to a variable called IGNORECHAR, which is initialized to '_'.
It could cause confusion when that character needed to be displayed.
This variable was seldom used and has now been removed.

Aside from some minor internal changes, another demo has been added.
DMXAMORT.PAS demonstrates the DMXviewer object, as well as the use of
the DataAt function to generate each record on the fly.

What Makes DMX So Easy to Use?

The final appearance of these programs is usually very spreadsheet-like.
After deciding upon your record structures, you can pass this to the
DMX initialization procedure using a formatting string. This string
will also determine the display format.

A RECORD with a STRING [20], an INTEGER, and a REAL may use this format:
' ____________________ | IIII | ($RRR,RRR.RR) '

The vertical bars ("|") delimiting the fields will be converted into
solid lines when displayed.

The data type of each field is determined by the letters in the string.
There are provisions for most data types, in many different formats.

Programmers only need to alter this one formatting string when changing
their data structure.

Getting Started

The object is initialized with a formatting string, and another string
which is used for an optional title.
Also required are five word-types:
1. the number of lines above the data entry area;
2. the number of lines below the data entry area;
3. border color (used only for field separators);
4. text color;
5. and the color attributes of the hilighted field.

DMXwindow.Init (' Name ref balance ',
' ____________________ | IIII | ($RRR,RRR.RR) ',
2,0, Cyan,LightCyan,$3F);

Opening the Data Screen

DMX is window-sensitive. Your own program can do the WINDOW procedure
to change the window position. (A separate border procedure is included
in this package for creating borders.)

Use the OpenBuffer procedure to set up the screen. This requires two
parameters: The actual data buffer and the buffer size (in bytes).

The structure of the data in the buffer must be the same as that which
was specified by the formatting string in the INIT procedure.
(There are advanced techniques which provide exceptions to most of the
rules; refer to the AdjustRecSize procedure in the DMXdFILE.PAS example.)

DMXwindow.OpenBuffer (DataArray, sizeof (DataArray));

Editing the Data

The EditData procedure will take care of your data editing chores.
The parameters required are the data buffer (same as in the OpenBuffer
procedure) and keyboard control information:
Key and Ext are two char types for returning the last key pressed.
(If the last key was an extended character, the Key will be #0 and
the extended code will be returned in Ext.)
KeySet and ExtSet represents the set of characters that will force
DMX to exit.

DMXwindow.EditData (DataArray, Key,ext, [Esc],[F1,F10]);

File-Handling Procedures

Loading and saving data is not directly a function of DMX.
But this a necessity so often that Dwindow, a descendant object of
DMXwindow, was written to do simple file-handling chores.

It contains two procedures:

Dwindow.LoadDataBlock (DataArray, sizeof (DataArray), F);

Dwindow.SaveDataBlock (DataArray, F);

The file variable F must have been previously ASSIGNed.

A Simple Example

This is a very simple example. It does not provide a fancy border,
nor does it include a facility to save the data. It is meant only
to show how easily a data entry screen can be created.

Program DEMO;
uses Dos,Crt,DMX2;
type DataRec = record
S :string [20]; I :integer; R :real;
var Key,ext : char;
DataArray : array [0..99] of DataRec;
DMXa : Dwindow;
Window (18,2,69,22);
FillChar (DataArray, sizeof (DataArray), 0);

DMXa.Init (' Name ref balance ',
' ____________________ | IIII | ($RRR,RRR.RR) ',
2,1, Cyan,LightCyan,$3F);

DMXa.OpenBuffer (DataArray, sizeof (DataArray));

DMXa.EditData (DataArray, Key,ext, [Esc],[F1,F10]);


How Can I Make DMX More Powerful?
Advanced Programming

Object-oriented programming is what makes DMX powerful. So far, we have
only scratched the surface.

DMX allows Pascal programmers to quickly create a data entry screen.
Object-oriented programming allows programmers to change DMX itself.

For instance: DMX, by itself, only concerns itself with data entry.
It does not display the current record number in any particular place.
However, there are several virtual procedures in this object which have
been reserved for specialized use.

Programmers can create a descendant object with a procedure called:
SetUpRecord. This procedure is used internally before editing each
record -- and originally did nothing. A descendant for SetUpRecord
can display the current record number whereever the programmer decides.

Another example: One apparent drawback to DMX is that it requires the
entire database to be loaded into an array. But this can also be
circumvented by replacing a virtual method.

Everytime DMX accesses a record, the location is provided by the DataAt
function. This function is given a record number to calculate a memory
address in the data array.

A descendant for the DataAt function can be written to read the
record from a file, and return a pointer to where it is is stored.
(The example program DBENTRY.PAS works this way.)

Descendant objects can also be written to remove a feature from DMX.
The procedure ZeroizeRecord (var RecordData ) is called whenever the
user presses ^Y.
A descendant can be written where ZeroizeRecord would do nothing.

Reserved Code Characters

So far, we have only edited strings, integers, and reals. DMX can be
used for even more data types in several different formats:

^ = uppercase string field
_ = string field
c = character field (or character array)
C = uppercase character field
# = numeric string field (for entering phone numbers)
N = numeric character field (for dBASE-type fields)
0 = numeric character field (for entering phone numbers)
B = byte field
W = word field
I = integer field
L = longint field
R = real number field
~ = boolean value field

Note: Lowercase code indicates positive values only (for numbers).

DMX requires these restrictions for the format string:

1. Do not use more than one type of format character in each field.
2. Do not mix the case of format characters within each field.
3. When using 'N' fields: A left parenthesis counts as one digit.

 December 23, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>