Tech Tip: 4D v6.5 Tools - New Features in Version 6.5
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: June 11, 1999
4D Tools has always been an important utility for any 4D developer. Besides repairing damaged data files it provided additional tools for compacting databases that had fragmented over time.
4D Tools v6.5 introduces new features to check your database structure.
New Features
4D Tools now allows you to define the default behavior of the program when opening, compacting, and checking a database. These behaviors can be set in the Properties… menu item in the File menu.
- When opening
This option allows you to define an operation that will be executed by 4D Tools v6.5 each time it opens a database. The following options are available:
Check Structure File
Check Data File
Compact - When compacting
The "Put compacted database in the same folder" option allows 4D Tools to automatically place the compacted data file in the same folder as the structure file, without the user having to select a location. The "Ask for Destination Folder" option is selected by default. The user must select where the compacted file is to be placed. - When checking
This option allows you to stop the checking of a database as soon as a certain number of errors have been reached. The maximum number of errors applies separately to checking the structure file and the data file.
Checking the Structure File
You can now check the structure file for a number of errors:
- Resource map – checks the integrity of resources at a low level.
- Passwords – loads the password table. If 4D Tools encounters a problem loading the password table, it will try to recover the Designer password. All other users and groups will be deleted. If the database is extremely damaged, checking will be terminated. 4D Tools writes a list of the objects whose access privileges have been removed to the journal if the Activity Report option is activated.
- Lists – checks the resources related to lists. If a list is referenced but does not exist, it will be created. If a list exists but is not referenced, a reference to it will be created.
- Menu Bars – checks the resources related to menu bars and menus. If a menu bar is damaged, a generic menu bar will replace it. If a menu bar is referenced but does not exist, it will be created as an empty menu. However, if a menu bar exists but is not referenced, or if a menu exists but is not referenced in a menu bar, it will be deleted.
- Database Methods – checks resources related to database methods. If a database method is referenced but does not exist, it will be created as an empty method. If a database method exists but is not referenced, it will be recovered if the "Looking for Lost Methods" option has been checked.
- Project Methods – checks the resources related to project methods. If a method is referenced but does not exist, it will be created as an empty method. It is possible to recover damaged methods if the "Looking for Lost Methods" option has been checked.
- Pictures – checks the resources related to the pictures. Indicates the number and IDs of unused pictures. If a picture is referenced but does not exist, it will be created as a blank picture. If an image exists but is not referenced, a reference to it will be created.
- Help Elements – checks the resources related to the tips/help balloons. Indicates the number and IDs of the unused help messages. If a help balloon is referenced but does not exist, it will be created. If a help balloon exists but is not referenced, a reference to it will be created.
- Tables, forms, etc. – checks the structural integrity of the database by checking resources related to tables, fields, triggers and forms. If the structure of the tables/fields is damaged, 4D Tools will stop the repair procedure. The database is then no longer usable. If the internal references of a table are damaged, the forms linked to this table will be lost. Only the object and form methods can be retrieved as "lost methods".
- If a form is damaged, a generic form containing a Cancel button will replace it. Only the form method will remain attached to the form. Other objects on the form will be lost. The methods of these objects can be recovered as "lost methods".
- For each form, 4D Tools checks if there is a form method and/or object methods. If a form method or object method is referenced but does not exist, it will be created.
- Searching for lost methods – Retrieved "lost methods" are then saved as project methods. This option is only active if the "Checking Database Methods", "Checking Project Methods" and "Checking tables, forms…" options have been previously selected. In fact, it is only after selecting all these options that it is possible to establish a list of methods that are not referenced by any other object. This list therefore becomes the list of lost methods.