The following sections discuss several methods for dealing with Designer libraries. The discussion of each method describes what you should do with your code during the development stages, as well as how to prepare your code for distribution.
In general, application libraries distributed to users on a multi-user system should be either (1) set to READONLY before distribution by using the Designer System Administrator Utility or (2) locked during read operations on the library. This ensures that the Designer library file is not changed by another user or application on the system.
If you are doing development on a multi-user system and many developers will be working with the same libraries and forms, coordination is required to ensure that the libraries and forms you are using in code are not changed by another user. You should put into practice development guidelines to ensure this does not happen, including using the form security system available through the Designer System Administrator Utility and setting the library locking switch in the Designer configuration file.
If you are reading more than three forms from the library at a time, the method shown below will save a significant amount of time because you do not have to lock and unlock the library for each form read. However, if you do this, other users will not be able to read forms from the library while you have it locked. In general, you should unlock the library as soon as you have finished reading your forms.
|
||
|
|
|
|
|
|
For distribution, you should also make the library READONLY to ensure that the library is not corrupted while it is open.
During development, the library is safely locked during the reading of forms. Once you set the library to READONLY, further time-savings are gained since the settings made by sdl_lock() are ignored.
This method is for applications that read in a number of forms throughout the course of the program. In such a case, it is advantageous to leave the library open during the course of the program to save the time needed to open and close the library several times. Automatic library locking should remain on to ensure that the library is not accessed by another user during reads.
|
||
|
|
|
|
|
|
For distribution, you should also make the library READONLY to ensure that the library is not changed or corrupted while it is open.
If the application is only being distributed for single-user systems, you do not have to worry about other users corrupting or changing the library. You can save time by only opening and closing the library once. Locking can be turned off.
|
||
|
|
|
|
|
|
You should also make the library READONLY to ensure that the library is not corrupted if it is open at the same time as a power surge or outage occurs.
Warning: Turning library locking OFF during development will save time, but do not turn library locking OFF if you are doing development on a multi-user system. Only turn library locking OFF if you are doing development on a single-user system.