The Esstu Pack
Index
VX-REXX Object DLLs
How many of you use VX-REXX for your programming? Please stand up and accept your well-earned applause! Everyone else, you may switch off here - this discussion won't be of much value. (Right. I think I got rid of any flippers that were still left! :)
VX-REXX has a thoroughly object-oriented design. Not only is everything (and I mean everything - even Application, Screen, etc) an instance of some class, but classes can be subclassed and subsubclassed ad infinitum. As a result, anyone (with the right tools) can write a subclass of a standard object, modifying its behaviour slightly.
My efforts to master this great power have been partially successful; I still get some odd memory leaks and such (oops!), but some experiments have lasted some time "in the field". In case anyone else is interested in some odds and ends, I have packaged them up together for your benefit.
Easy installation, if you want all the files: just unzip VXODLL.ZIP into your VXREXX directory (the one pointed to by environment variable 'VXREXX' (usually \VXREXX on some drive), which should contain VRXEDIT.EXE etc). Start (or restart) VX-REXX, and, if you don't see a whole lot of extra icons in your tool palette, press Ctrl-L and ensure that 'Search for and load all VXO files' is checked.
Custom installation, so you can pick and choose: unzip VXODLL.ZIP into a temporary directory, and move/copy the appropriate VXOs and DLLs into your VXREXX directory. Again, use the 'load all VXO files' option for simplicity.
If you prefer to have them all available, but not in the tool palette for all projects (this is how I've arranged things), put all the DLLs in your VXREXX directory, but none of the VXOs. If in a project you want (eg) the OneLineContainer object (which is stored in OneLine.DLL), open the project, press Ctrl-L, choose Find and Add, select OneLine.DLL from the file dialog, close the Object Libraries window with OK, then open it again with Ctrl-L, select OneLine.DLL in the Loaded Object Libraries list, and click Remove. It will be loaded next time you open this project, if you have used an object from it. I know all this sounds terribly complicated, but (a) it will seem less so when you've done it a few times, and (b) with flexibility comes complexity, and if you want no complexity, go for one of the other options above.
Note: Because this is a collection of DLLs, rather than a specific program, there is no version number. Instead I offer a build date - if you downloaded the ZIP with a build date older than the one listed here, at least one of the DLLs has changed.
This build contains the following objects:
- CtrlEntryField (CtrlEF.DLL): an entry field with Ctrl-Left and Ctrl-Right support. Acts to the program exactly the same as an ordinary entry field; visually identical to an ordinary entry field; but does this one thing better.
- OneLineContainer (OneLine.DLL): a container with an extra property, ShrinkData (boolean), and altered behaviour on AddRecordList and SetFieldData. If ShrinkData is 1, all container details view data is chopped off at the first CR. I wrote this specifically for Hudson (as of version 3.5.3 it can make use of OneLine.DLL and has an option for Shrink to One Line), but it may be useful in other contexts. The net result is that however much data is put into the container, it will always show just one line for each record - which makes for a tidier display. Note that the excess data is completely discarded: if you use GetFieldData in ShrinkData mode, you'll only see the first line.
- SuperDateEF (SDateEF.DLL): an entry field for displaying dates. Designed for database work, the Value property is a simple number (year*512+month*32+day), which, if stored in a signed 32-bit integer, allows for Year 4194304 (8388608 if unsigned!) - plenty of room. Note: This scheme actually allows days from 0 to 31, months from 0 to 15, and years from 0 to whereever. A value of 0 for any component can be used for "unknown" - store a date of 00/06/2001 to mean "sometime in June 2001". Month values of 13, 14, and 15 are shown as Early, Mid, and Late respectively (eg 00/14/1985 is shown as "Mid 1985"); the day is ignored in this case.
- TriCheckBox (TriCheck.DLL): Tri-State Check Box. A subclass of CheckBox with three states - off, on, and "undefined" (which can be used to mean anything). The CheckBox property Set can still be used, and it returns 1 for On, and 0 for Off and Undefined; a new property State returns 0/1/2 for off/on/undefined.
- ValidationEntryField (ValidEF.DLL): Entry field with character validation. Set property ValidChars to a list of all valid characters (default = everything from 0x01 to 0xFF), and incoming characters will be screened. Not 100% foolproof, but allows some "instant user feedback" when (for example) a letter is typed into a numeric entry field (which should have ValidChars set to '0123456789' (plus dash and/or period if negatives and/or decimals are allowed).
- YNCheck (YNCheck.DLL): Check box with a Value property. Another object designed for databasing work, this allows the user to see a check box, but the program to see (something very like) an entry field. Use of YNCheck, SuperDateEF, and CtrlEntryField allows the program to synchronize Value properties with database contents, and let the user see much nicer-looking values - a check box for Y/N values, dates with slashes, and text fields with Ctrl-Left/Right support.
If any of these is useful to you, please drop me an email at talldad@kepl.com.au (Dad's email address at home), or chrisa@jims.net (my own at work). Source is available if you really want it (believe me, you don't want to see my mess!), and if you can persuade me that you want it for legitimate reasons (like wanting to know how it works, or wanting to build more VX-REXX object dlls!).
File: VXODLL.ZIP (109KB) - latest build 20021204
Requires: OS/2, REXX
Installation: See above
Operation: Use objects from within VX-REXX
De-installation: Delete.
Distribution: Emailware.