|
Visual Expert Exceptions offer a way to improve the default
code analysis.
An exception processes a given function or property and creates
a supplementary relationship between two components of the
application.
As a result, the application description is more complete,
especially regarding some dynamic references that are not
taken into account by the default code analysis.
An exception can be related to a method.
The exception will be raised each time this method is found
in the code.
Several methods can raise the same exception.
Visual Expert supports class methods, global functions and
system functions.
An exception can also be related to a property.
The exception will be raised each time a value is assigned
to this property.
Several attributes can raise the same exception.
Visual Expert supports instance and global variables. Local
variables are not supported.
Example: The function "uf_set_dataobject(d_dataobject)"
is called in the application. This function modifies the dataobject
property of a DataWindowControl to “d_dataobject”.
In this case, an exception is raised to add a reference between
"d_dataobject" and the modified DataWindowControl.
First, this exception has to be declared within Visual Expert
(Visual Expert 5.6 – Build 60522 and above).
The "Exception" tab of the Setup window lists the
exceptions currently raised in the application. You may open
this windows with the menu [Options - Project Setup].
The [Add] button is used to declare a new exception.
This button opens the following window:

In the above screenshot, the function "uf_set_dataobjet"
defined in the userobject
" pfc_n_cst_selection" is raising an exception.
This exception is called "SetMultipleDataobjetSelection"
(a function changes the dataobject of one or several objects.
The corresponding dataobjects are passed as parameters).
Visual Expert comes with several exception types.
The previous example, with a dataobject modification, corresponds
to one type of exception.
Another example is an exception raised when a function opens
a window or menu and where the name of the opened object is
passed as a parameter.
This second exception will add a reference between the object
calling this function and the opened window or menu.
Do not hesitate to contact
us if you need help to declare exceptions in your
application.
|