|
|
Clipper, XBase++ Conversion
!!! NEW !!! 9 June, 98 COMIX Scopes translated to XBase++ I use a lot of scopes in all my browses and until there is a Comix++ library, I have written the main scoping functions for my own use. These functions behave similar to the Comix functions and can be used for testing purposes. Download CMX.ZIP - it includes the main CMX.PRG file and an include file CMX.CH. To use - add #include "cmx.ch" to the top of all your programs or in you main include file. Then add PUBLIC _cmx_list := {} to the top of your MAIN() function. Then all you have to do is add CMX.PRG to your make and link script. Browse codeblocks for record movement must be changed as well - use AK_Skip(), AK_GoTop and AK_GoBot().
Functions included with this version are: cmxSetScope() AK_Skip() If you have used COMIX scopes in you code, there should be no changes at all. Please note that AK_Skip, AK_GoTop and AK_GoBot are needed to make the thing work. How does it work: When you set a scope, the system loads it into an array (_cmx_list{}). Scopes are unique to the currently selected database and the current Index Order. Therefore you can have multiple active scopes for an opened database. Record movement (Seeks, go top and go bottom) functions check the scope conditions after moving the record pointer. Use cmxClearScope() to remove scope or alternatively, closing the database will clear all active scopes for a database. Please note that this is Work In Progress and ANY help will be highly appreciated.
This zip file contains
routines to provide a hybrid CRT modal dialog for Menu and Alert
replacements for Clipper Menu To and Alert functions. The base code
from Alaska has been modified to provide a better Pushbutton placement
and width. > This zip file contains routines to translate Clipper's @..SAY..GET into XBase++ Parts - XBPStatics and XBPSles. I have modified XbpGet.PRG to include Up/Down arrows and the Enter key to move between SLE's as well as other keys. Importantly there are two functions - AK_GET() and AK_SAY(). These are automatically translated to if you add #include XbpGet.CH at the start of your program and including the new XbpGet.PRG into your compile/link script. Also change all your colours to N/W. To use the VALID
clause, change the editing variable to x:editbuffer()
in the VALID. Both RANGE and WHEN clauses are now working. (15/4/98). Added functionality in WHEN - ALL the GETS in the screen will be abled/disabled based on their WHEN conditions. This is done everytime you move between the Gets. Please run the MT.PRG test program. These routines convert the Gets and Says as I mentioned above. The Gets use the existing getlist array and this has to be declared as PRIVATE at the start of your function and cleared BEFORE you exit that function: PRIVATE getlist := {} at the start and CLEAR GETS at the end otherwise you will have rouge XBPSLE's left on the screen. With the Says, you can leave them as normal hybrid screen output (there is a RETURN near the start of AK_SAY() function), or you can get AK_SAY() to convert them to proper XBPStatics. To do this, comment/remove the 6 odd lines. Declare a saylist array at the start of you function and again clear the saylist array at the end of your function: PRIVATE saylist := {} at the start and CLEAR SAYS at the end otherwise you will have rogue XBPStatis left on the screen. In the include file, I have also cleared the saylist whenever you issue CLEAR to clear the screen. You can use this if you like or comment it out. Multiuser considerations: If you want to update fields as you go, the oXbp:Datalink code in AK_GET() locks, updates and unlocks the field. I used this system when I originally converted a large system by changing getsys.prg. I made the same changes in XBase++ and it works okay. Please note the code in Datalink needs more work. If you want to update at the end of all gets, you will have to make changes to the Datalink, the key handling routine for XBPGet and the READ system in XBPGet.CH. Please note that this is Work In Progress and ANY help will be highly appreciated. History: 13 April 98 SORRY NO MORE TO COME...
|
|
|