Clipper/XBase++

CurriesBach FlowerPhotosSoftwareMusicGeneral

 

Google

 

Home
Up
Clipper/XBase++
Modem Graph
Net Traffic
CPU Monitor
SWS Clock
What !
MammaGamma
Blackjack
Yatzzee

 

 

Clipper, XBase++ Conversion

Everything Indian at Amazon


Here are some XBase++ routines and notes that I have written during my Clipper/XBase++ conversion investigations..

!!! 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()
cmxClearScope()
cmxClearALL()
SET SCOPE TO....
SET SCOPETOP TO...
SET SCOPEBOTTOM TO...
AK_Skip()
AK_GoTop()
AK_GoBot()

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.

 


Hybrid PROMPT/MENU TO and ALERT

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.
To use, link in AKMENU.PRG to override the Clipper Alert function. To use the Menu To replacement, add #include "MenuTo.CH" before issuing any PROMPT commands.

 >
Clipper @...SAY...GET to XBPStatic and XBPSLE

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.
For example : GET cTest VALID .not.empty(cTest) has to be changed to
GET cTest VALID .not.empty(x:editbuffer()) etc. - NOT NEEDED ANY MORE (15/4/98)

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:

8 May 98
- DISABLLE GETS - similar to the original CLEAR GETS

17 April 98
- SETKEY implementation and translation
- Fixes to XBPStatics

16 April 98
- make GetActive() work
- Validation on DATES - Test CENTURY and EPPOCH
- Post translated data to the screen beforee leaving (dates etc)
- make SET CONFIRM to work - auto skip to nnext get
- new HIDDEN clause for passwords

15 April 98
- The original Clipper VALID conditions DO NOT need to be changed to x:editbuffer anymore
- Get the RANGE clause working
- Tidyup XbpGet.CH
- BIG ONE - get the WHEN clause workking - updates ALL Gets every time you move
- Redo length calculations for gets using ttransform/picture
- include sample program MT.PRG with notes to compile, link and run

14 April 98
- Fixes to reset GET focus after VALID function calls
- Comment out Locking system for the time bbeing
13 April 98
- Get VALID working

12 April 98
- It works !!!
 

SORRY NO MORE TO COME...

Everything Indian at Amazon

 



Everything Indian at Amazon

Google

Visit The Ring of Fire Home Page

This site is a member of   The Ring Of Fire
A linked list of Chile websites

Next - Skip Next - Next 5 - Prev - Skip Prev - Random Site

Join the ring or browse a complete list of The Ring Of Fire members
If you discover problems with any of The Ring Of Fire sites, please notify the Ringmaster
A service of netRelief, Inc.

© Ashok Kumar Parmar, Dunedin, New Zealand       

1