In USoft Windows Designer, you can create a new application and base it on an existing application. The existing application is the template of the new application.
If you specify an existing GUI application as a template, all the initial specifications of the re-used GUI classes are read from the ESI flat file of that GUI application.
You can continue developing both the template and the GUI application(s) based on it:
•If you change the template, the changes will not cascade to the application based on it until you generate a new template file. •Once a template file is re-generated, all changes made to the template necessarily cascade to the application based on it unless the GUI classes concerned were not selected for re-use. This merge behaviour can cause onforeseen effects. To help manage this, it is possible to limit the subset of GUI classes that are re-used from the template. Do not consider using a template other than in the following situations:
•You want to develop a number of USoft applications with the same general look and feel. For example, in all your applications you want the same yellow color as a background for all windows. Another example would be that you want certain standard navigational behavior on all Lookup Windows across your projects. •You want to keep a library of foundation classes that you are likely to re-use across applications. Typical candidates for such foundation classes are classes not related to the conceptual model, such as customized ActiveX control subclasses or dialogs. CAUTION: By using templates, you could create an entire tree of GUI applications based on each other. This can get needlessly complicated and is not generally recommended. Remember that a more straightforward way to re-use definitions is to take advantage, within a single Windows application, of the many style guide and inheritance capabilities of Windows Designer of generic GUI classes. Also remember that you can carry individual GUI classes from one project to another through external schema XML export files.
To base a new Windows application MYAPP on an existing template Windows application MYTEMP:
1. | In USoft Binder, create a Windows Designer item and set Application = MYTEMP. |
2. | Open the item and define the template's GUI classes. |
4. | Choose Tools, Generate Flat File from the Windows Designer main menu and generate a file called "MYTEMP.esi". |
5. | Choose File, New Application from the menu. Specify Application = MYAPP and Template = MYTEMP. (Use the Browse button to point at the file you have created in Step 4.) |
You are now ready to develop your Windows application based on the template. If you deploy MYAPP on different machines, you must distribute both a "MYTEMP.esi" and a "MYAPP.esi" flat file.
|