Validating Schema Definitions

You can validate the definition of the following elements in your current schema.

To validate the current schema

  1. Select the Validate command from the Schema menu for the current version of a versioned schema. (The Validate command is disabled for the latest schema version when the current schema in marked for reorganization.)

    As classes in the schema may require reorganization, you can validate these classes if the schema itself is not marked for reorganization.

    The Validate Schema dialog, shown in the following image, is then displayed.

  2. Check the appropriate check box of each definition in the current schema that you want to validate, as follows.

    • Object References, to output a list of all invalid object references.

    • Inverses, to output a list of all invalid inverse reference definitions.

    • Application, to output a list of all invalid application definitions.

    • Forms, to output a list of all invalid form definitions and report on the following.

      • A control or menu has been deleted from a form but not all associated event methods of the control or menu have been deleted or it does not have an underscore character (_); that is, a form has an event method that does not have an associated property and it is not a Form event.

      • A control or menu has been deleted from a form but not all associated event methods of the control or menu have been deleted; that is, a form has an event method that does not have an associated property.

      • A control or menu has been deleted from a form but not all associated event methods of the control or menu have been deleted; that is, a form has an event method that does not have an associated property but a non‑control or menu property also exists.

      • Form has invalid control parents.

      • Form subclass has no corresponding form instance.

      • Form instance has no class.

      • Form control or menu property has no control or menu instance.

      • Invalid form property of control or menu.

    • Dictionaries, to output a list of all invalid dictionary definitions.

    • Methods, to output a list of the class and name of all methods in the current schema that are in error or are uncompiled.

    • Properties, to output a list of all properties in a class that have duplicate feature numbers.

    • Reorganisation, to validate and report on the following.

      • If a schema has been marked as versioned but there are no classes versioned.

      • If there are versioned classes but the schema has not been marked as versioned.

      If you open the Validate Schema dialog from the latest version of a versioned schema, the Reorganisation check box is disabled.

  3. If you want to validate all schema definitions, click the Set All button. All schema definitions are then checked for validation.

  4. If you do not want your selected definition validations output to your monitor, select the Printer option button to output the results to your default printer or the Log File option button to output your selections to a log file.

    The log file, named valscm.log, is located in the binary (bin) directory in which the JADE executable file (jade.exe) is located.

    You can view the log file by using a text editor such as Notepad. The output file is not cumulative; that is, the file is overwritten the next time it is used.

  5. Click the OK button to confirm your selection. Alternatively, click the Cancel button to abandon this selection.

The validation of all required schema definitions is then initiated. A progress dialog displays the selected definitions as they are validated. After a momentary delay, a message box is displayed, advising you that the validation has completed successfully and no errors were detected. If errors were detected during validation, the End of Validate dialog displays the schema or schemas that contain errors.

If your validation output was directed to the monitor (the default option), the Jade Interpreter Output Viewer window displays the validated definitions. For details about using the Jade Interpreter Output Viewer to view definition validations output to your monitor, see "Using the Jade Interpreter Output Viewer", in Chapter 1 of the JADE Runtime Application User’s Guide.

The following is an example of validation output to the Jade Interpreter Output Viewer window (which is the same as the information output to the default printer and to the valscm.log file).

=====================
Validating References
=====================
454 object references were validated.
There were no errors.

===================
Validating Inverses
===================
No errors

=======================
Validating Dictionaries
=======================
No errors

================
Validating Forms
================
Control toolBar in Background has no corresponding property
Control tCustomers in Background has no corresponding property

==================
Validating Methods
==================
Method Background::load has errors
Method Background::toolBar_mouseDown has errors
Method Background::toolBar_mouseUp has errors

=======================
Validating Reorg Status
=======================
No errors

Schema validate completed.
There were 5 errors.
Elapsed time = 00:00:03

If your validation output was directed to your printer or the log file, focus is then returned to the Schema Browser.

If a selected definition requires modification (for example, a method requires compilation or the schema requires reorganization), you must perform the appropriate actions to effect the required change.

Errors are detected when references, dictionaries, or reorganization are validated only when your schema is corrupted, for some reason.