AD2 2001 Toolkit for Rapid Database Application Development with Clipper and Zachary |
|
|
|
|
|
What´s new in version 2001? If you´re upgrading from version 2.7, here´s what´s new... A lot of the changes in AD2 are related to:
Here´s the list... The AD2 Hypertext Manual As always, the manual has been expanded and revised. We added a complete section on "AD2/Zach Training and Tutorial." This gives you a short training on how to approach Zachary programming, how to set up your environment, and includes a complete "Express Tutorial" that will help get you started (or provide a refresher) with both AD2 and Zachary. The Enhanced Help Routines The help routines have been modified so you can more easily install them. The AD2 version is now the default in Zachary, and will automatically be linked and used. There is no need to call ad_SetHelp() unless you want to change from the default operation. The AD2 Export routines have been modified to automatically write the file name in the procedure, so that's no longer a trick. And it's no longer required that you tell Zachary to Track Procedures. Simnply choose external help, the default, and if you want scrollable help topics, export the routine to your program from the AD2 Sample Definition files. To install the updated version in a program that had an older version, delete the older AD2 procedures from your application, then export the new routines to your application. New CD and Read-Only Options Now you can set an application or certain tables as “read-only, as would be required on a CD-ROM. This means you can design an application to provide information, run completely off the CD. Or you can designate certain read-only tables on a network in a read-only folder for look-up data pruposes. You can even make this flexible, since your application will test the target to see if it is readonly, and if it is it will open in read-only mode, otherwise it will open in read-write mode. This means you can allow edits to certain tables for those users who have write access, and deny writing to others, and they can run the same program! It also means you can archive data to CD and run the program to examine the archives data only. Complete instructions are included with AD2 Toolkit. The AD-Setup Wizard The Setup Wizard now generates installations that can be written to a CD-ROM, complete with the automatic start commands that make Windows launch the setup program when the CD is inserted in the CD drive. AD2.LIB Library Routines ad_AppeDup() -- New function to append a new record and load all the fields with the same data as in the "current" record when the function is called. Also added as command APPEND DUPLICATE. (Does not reuse deleted records.) ad_AppeDuR() -- New function to append a new record and load all the fields with the same data as in the "current" record when the function is called. Also added as command APPEND DUPLICATE. (This version will reuse deleted records, provided there is a "deleted" index; see AD_APPEND().) ad_Append() -- Changed to let Zachary create the deleted() index during fsort() operations, for CDX,NSX tables, rather than stopping operation to create additional tags. ad_CapList() -- New function returns an array of LPT ports captured under a Novell network. ad_ChkCfg() -- New function to check minimum FILES= and BUFFERS= settings in the CONFIG.SYS or CONFIG.NT files. In Windows Me, the FILES entry is made to the SYSTEM.INI file, because the CONFIG.SYS file is history! ad_ChkClp() -- Changed to create a path if necessary if it's properly defined but does not exist. Also changed to reject \DOS, \WINDOWS, \WINNT and an NT/Win2000 SYSTEMROOT path as valid TEMP, TMP, or SWAP directories (Formerly rejected only DOS). Also changed by adding a parameter so you can permit an application to run if NO path is set (Clipper then defaults to the current directory) provided that the current directory is writable. ad_EZPop() -- New function to make it super-easy to use a zpop() style pop-up in user code. (In case you're tired of writing complex zpop() code.) ad_Ferase() -- Modified to retry file deletes up to 15 times. We discovered that on faster computers under Win98 we could close a file, then try to ferase() it (using Clipper's function), and the ferase() would fail, with an error indicating a sharing violation. Win98 was not keeping up with itself. Then we changed ad_Pack() and other AD2 functions, ZACH2 functions, and generated code to use ad_ferase() instead of ferase(). ad_FPrint() -- Enhanced. Changed default to Network Dump, with Page printing as an option. Added ini file override of Page Print/Dump. Added Novell CAPTURE check so if a port is captured, the network dump will be performed. ad_FullPath() -- New function to expand a partial path to a full drive and path specification. Also corrects an incorrectly formatted 8.3 path. ad_Gather() -- New function that will gather values of all the fields in the current record and, later, write those values into a record in another table. This can also be used to restore a record, i.e, to record all the values, allow edits, and then "undo" the edits by writing the original values back to the original record and table. ad_InstPath() -- New function that finds/creates a special installation directory on a hard drive or network drive. Useful in certain CD installations. ad_IsHoliday() -- New function that determines if a date is a holiday. ad_IsPath() -- New function that determines if a path exists on a target machine, regardless of write permissions. ad_IsWinMe() -- New function returns .t. on computers running WinMe() ad_IsWorkDay() -- New function returns .t. if a passed date is a workday, i.e., not a holiday or weekend. Useful to project a completion date x workdays in the future. ad_MemoLine() -- New function that makes it easier to display a long line or memo field on a screen or browse window as several lines. ad_Mov2Dsk() -- New function that prompts user to insert a diskette, erases all files on the diskette and copies aspecified set of files to that diskette. ad_NamePar() -- New function that takes a name field and parses it into first, middle, last, and Jr-Sr suffix names. Useful for data transfer to other systems or for form completion. ad_PrnPop() -- New function pops up a list of valid LPT ports for print jobs. ad_Progress() -- Changed to display percent completed as well as time remaining. ad_ReadIni() -- Changed to search for default file first in exe path, then if unable to write to that path, to look to the data path and then to the temp path. ad_RevKey() -- Changed to return .t. if the validation field is empty. ad_Script() -- Added DELETE FILE and ERASE commands to interpreted command list. ad_TempFil() -- New function returns the name of a "temp" file not currently in use on the system. Used to write user code that does not collide with another project currently underway. ad_TempPath() -- New function returns a working path for temp files by checking SET CLIPPER, SWAP, TEMP, and TMP values. Useful for keeping temp files off the main directory. ad_TimeConv() -- Added flexibility regarding the format of the time string passed as a parameter to this function. ad_WinPath() -- New function returns the path to the Windows directory. Example code with this function shows how to automatically create a Windows desktop icon to run your program. ad_WipeOut() -- New function that erases all files and subdirectories in a specified path. ad_XFile() -- New function that creates a new, unique file name with a specified extension for use as a temporary file, and manages these files by erasing any that are older than a specified number of days. ad_XFile2() -- New function that creates a new, unique file name with a specified name and unique extension for use as a temporary file, and manages these files by erasing any that are older than a specified number of days. AD-SETUP The AD2 installation wizard was changed to generate SETUP.EXE (instead of INSTALL.EXE) to be more consistent with current setup programs. Added the ability to place an icon on the Windows desktop. We updated the setup program routine which would lock up sometimes on fast Win 95/98 machines when trying to delete a file. Now Setup.exe lets Windows catch up with the fact that the temporary files had been closed. Added the ability to generate to one single large directory for a CD-ROM installation in addition to the multiple smaller diskette routines. Added ability to install to the same drive, and to launch setup.exe from a different drive and path, so that it may be launched from the Windows Start - Run prompt. Added capability to identify Windows NT and Windows 2000 installations and update appropriate autoexec.nt and config.nt files. Sample Definition Files -New R&R Windows routines, designed for R&R Report Writer version 9 for Windows 2000/NT/98/95. Now you can have cool Windows reports, complete with graphics, printing from your Zachary DOS application. If you've used the other R&R routines, this will be a simple upgrade. Just delete the old R&R procedures from your application and export the AD_RRW program into your application. Your old browseable and single-call report definition files will still work, with very slight edits. -Security Routines. Improved new user sign-on and password reset routines. Changed references to public variables monochrome and update to use ZPARAMLIST(). (Those public variables are no longer generated.) To install the updated version in a program that had an older version, delete the older AD2 procedures from your application, then export the new routines to your application. ZACH1.EXE Now it´s easier to edit Condition for Access, Initialization, and other “code” fields. Added a pick list and paste capability (using [Alt-F3]) to Procedure Definitions (Standard Browse Message, Condition for Access, B-type conditions and Parameters to receive) and Field Definitions (Initialization, Validation Clause, Condition for Access, Condition for File Validation, Condition for Reinitialization, Reinitialization expression, and Parameters to Pass). This function "learns" each time you make one of these entries and then lets you pick one for automatic keyboarding. ZACH2.EXE (Generated Code) Added the zinit() function, which is called at the top of the Zachary generated program. The function is written at the bottom of the main prg, and is used to initialize temp vars, certain statics, and the CD/Readonly statics. We recommend you place zinit() at the top of any boot function, after changing the "current" directory (if you do that in your boot routine) to initialize these values. Changed zappname() in zac.ch (among other changes in zac.ch). This used to refer to a zwinstatics() stored variable, and now pulls its value from zXFiles(). Be sure to recompile any custom or external prgs that use zac.ch to pick up this and other enhancements. Zach2 now writes a default c.bat file for you if one does not already exist. For more information, see the explanation under the AD2/Zach Training and Tutorial section of this hypertext file. Moved ZBuild(), ZAppTitle(), and ZOwner() functions to pseudo functions as part of zwinstatics(), initialized in the zinit() function. Changed generation of the prg that builds/rebuilds tables to avoid the Memory Overbooked error that may be encountered when the function is too big. Changed generation of the sarrays() function that controls zbrowse(). This should avoid the Memory Overbooked error that may be encountered when the function is too big. Eliminated the public variables monochrome and update. These are now better handled using ZPARAMLIST(). Changed code generation for pages associated with S-Procs where a field had a condition for access. It could crash looking for the "insert" variable, which does not exist for S-procs, since you can't insert a record. Corrected a generation error for menus where you placed a U-field to be executed after each field... where there were no defined vars, therefore no zfields array, the generated code was trying to redraw the screen passing the non-existant zfields array. ZACH2.LIB (and ZACH253.LIB) Changed the code that searches for a valid user name to establish a temp variable to look for USER, USERID, and USERNAME environment variables, in that order. This allows Windows 2000 and NT operating system defaults to be overridden by using the USER and USERID variables. Changed indexing functions to display percent completed and time remaining, as well as the progress bar. In zbrowse(), if you type a search, a hard seek is executed and if not found, you are positioned at the top of the file. Now, if you set Soft Seek=On near the top of your .ini file, zbrowse will perform a "soft" seek and if there is no match, position you at the first record before the record you seek. Added dbcommit() after a delete in the zdelete() function. Changed ztempvar() to advise the user if you have set network to Yes and there is no valid username (or Novell station id) in the current environment. zof(), zofe(), zrl(), zfl() -- Modified to retry file opens/locks repeatedly with a timeslice release so Windows could close a file before trying to reopen it. Win98 was not keeping up with itself. Changed znewexe() to return .t. if running a new exe version in this directory for the first time, otherwise .f. Must be called AFTER zinit(). Used by Zachary and useful for update edits for new versions of software. Changed the Zachary get system so that when entering a date, you can press [Home] to adjust the date to today's date. You can also press [Ctrl-Home] to adjust the date to the end of the month. This is in addition to the existing enhancement for dates that allows you to press [+] or [-] to adjust a date by one day per keypress. Changed the Zachary get system so that when entering or editing a numeric value you can press an operator key (+, -, /, or *) and the pop-up calculator will pop up to continue the calculation. AutoPilot -- The Auto-Running Demonstration We changed Autopilot so it didn't run so fast. This is now a nice, viable feature of your Zachary program. It looked cool running fast, but you couldn't stop and read anything. Now it will pretty much follow the original script, pausing for up to 20 seconds or so. Autopilot parameter is now changed slightly to avoid collision with other parameters, requiring a colon between the command letter and the file name: "s:file" instead of "sfile", or "r:file" instead of "rfile". See Zachary Tips & Techniques under "AutoPilot - for Automated Demonstrations of your program" for more information. To see how this runs download our AD2X Demo program. Changes related to Advantage Database Server Until now, Zachary has not really been compatible with the Advantage Database Server (for client-server database operation). I've made a few changes to make Zach and AD2 more compatible. Zach1.exe now has a field in the RDD definitions to accept an optional "alternate" or fallback RDD when the Advantage server is not loaded. Code is generated to set the ztp() temp path to the Clipper Default path when an Advantage RDD is the default RDD for the application. Openfiles() will not attempt to set an order to an invalid order number with an Advantage table, since this will result in an error. Certain default Advantage initializations are made if an Advantage RDD is part of a system. Changes related to RaSQL/B Capabilities Until now, Zachary has not really been compatible with the RaSQL/B RDD (for Btrieve file access). I've made a few changes to make Zach and AD2 more compatible. Zach1.exe now has a field to record the desired file extension for a Btrieve file. Zach2.exe now generates code that opens files including the defined file extension, needed for Btrieve systems. The .lnk file is now generated in an order that makes the RQBRDD RDD definition work smoothly. I changed zof(), zofe(), zcsfiles(), and zupstruc() to work with RaSQL/B. Added function RQBBUILD() to ZACH2.LIB to remove and rebuild indexes in RaSQL/B. This includes special functions to add and remove temporary indexes if needed. I changed ad_SetAll(), ad_Ovl(), ad_Shift(), and ad_UserCount() to correct for a problem if using an RDD (like RaSQL/B) that does not return an array from the function DBRLOCKLIST(). I changed ad_UpStruc() to handle RaSQL/B btrieve files (and whatever file extension). I changed ad_Pack() to not pack a file if it is RaSQL/B. |
![]() |
|
Tortuga Tortoise |
|
Richard Hamilton Associates |