Common Desktop Environment: Application Builder User's Guide

Creating, Importing, Exporting, and Saving Modules

A module is a logical unit of a project. Each window and dialog in App Builder is a module of the App Builder project, for instance. A module is created when you choose New Module from the File menu of the App Builder primary window or New from the Module menu of the Project Organizer.

You do not have to create a new module for each window, but in most cases you will want to: this will make maintaining modules simpler and will allow you to use a module for various applications.

All module files in a project are saved when the project is saved. You can explicitly save a particular module by choosing Save from the Module menu of the Project Organizer. A saved module file has a .bil (builder interface language) suffix.

To Create a New Module

Do the following to create a new module, which will become part of the current project.

  1. Choose New Module from the File menu of the App Builder primary window or New from the Module menu of the Project Organizer.

    The Module Name dialog box will be displayed, with Untitled selected as the default name:

    Graphic
    Note -

    If you drag and drop a window on the workspace after creating a new project, the Module Name dialog box will be displayed, just as if you had chosen New Module from the File menu.


  2. In the dialog box, type in the name you want to give the new module.

  3. Click Apply or press Return.

    The name of the new module will appear in the Editing Module field at the bottom of the App Builder primary window. Any windows you drag from the Windows palette and drop on the workspace will be part of the new module.

To Import a Module into a Project

To import an existing module into the current project:

  1. Choose Import Module from the File menu of the App Builder primary window or Import from the Module menu of the Project Organizer.

    The Import File dialog box will be displayed.

  2. Change to the folder where the module (.bil suffix) file is saved.

  3. Change the Import Format type, if necessary.

    By default, BIL format is selected. If the file you are importing is a UIL file, click the UIL button. The file will be converted to BIL format when it is imported.

  4. Change Import By method, if necessary.

    By default, Import By Copy is selected. If you want to import the module by reference rather than making a copy of it, click the Reference button.


    Note -

    Import By Reference, which causes module files to be shared, can be dangerous, since the actual module file may be changed or deleted inadvertantly.


  5. Double-click on the module to be imported in the Files list.

    Or, select the file and click Import.

    The module will be added to the current project the next time you save the project.

To Save a Module

All modules in a project are saved when you save the project. If you want to save individual modules, you can do so in the Project Organizer.

  1. Display the Project Organizer by choosing Project Organizer from the File menu of the App Builder primary window.

    Graphic
  2. In the module array of the Project Organizer select the module you want to save.

  3. Choose Save from the Module menu.

    If you have saved the module previously during this App Builder session, the module will be saved without comment.

    If this is the first time you have saved the module, the Save BIL File dialog box will be displayed, with the name of the selected module (with a .bil suffix) in the Enter file name field.

  4. Change to the folder where you want to save the module, if necessary.

  5. Click Save or press Return.

To Rename a Module

Use Save As from the Module menu of the Project Organizer to rename a module. When you save the current project, the new module name will replace the old name in the project (.bip) file. The original module will still be in the project folder, but it will not be part of the project. To save a module without affecting the project, see "To Export a Module".

  1. Display the Project Organizer by choosing Project Organizer from the File menu of the App Builder primary window.

  2. Select the module you want to rename.

  3. Choose Save As from the Module menu.

    The Save BIL File dialog box will be displayed, with the name of the selected module (with a .bil suffix) in the Enter file name field.

  4. Type a file name in the Enter file name field.

  5. Click Save or press Return.

    The new module name will replace the old name in the project (.bip) file the next time you save the project.

To Export a Module

Do the following to save a copy of a module in the current project. The current project is not affected when you export a module. A new module is created, which is not part of the current project; the original module remains as part of the project.

  1. From the File menu of the App Builder primary window choose Export Module and select one of the currently open modules from the submenu displayed.

    Or, in the Project Organizer select the module to be exported in the module array and choose Export from the Module menu.

    The Export File dialog box will be displayed, with the selected module name in the Enter file name field.

  2. Type a new file name in the Enter file name field

    Or, change to the folder where you want to save the module and type a file name in the Enter file name field.

    If you want to save a version of the module in the current folder, do not change folders. Simply give the module a different name.

  3. Click Export or press Return.

    A copy of the selected module has been created.

To Save a Module in UIL Format

To save a module in UIL (user interface language) format instead of BIL (builder interface language) format:

  1. Choose Export Module from the File menu of the App Builder primary window and select the module you want to export from the submenu that is displayed.

    Or, in the Project Organizer select the module to be exported and choose Export from the Module menu.

    The Export File dialog box will be displayed, with the selected module name in the Enter file name field.

  2. Change to the folder where you want to save the module, if necessary.

  3. Select Save As UIL (above the Enter file name field).

    The file name suffix will change from .bil to .uil.

  4. Type a file name in the Enter file name field, if necessary.

    If the name in the Enter file name field is OK, leave it as it is.

  5. Click Export or press Return.

    The file will be saved with a .uil suffix.