Go to the first, previous, next, last section, table of contents.


Structure editor

MUIbase has two different operating modes, the record-editing mode, where you enter and browse records, and the structure-editing mode where you define the structure, that is, the tables, attributes and appearance of a project. This chapter describes the structure editor and explains how to manage the structure of a project.

To switch from record-editing to structure-editing mode select menu item `Structure editor' in the `Project' menu. This will close all windows and open the structure editor window. To switch back to record-editing mode select menu item `Project - Exit structure editor' or simply close the structure editor by clicking on the close button in the window title bar.

The structure editor window is divided into three parts: in the upper left part there is a field `Tables' for managing the tables of the project, the lower left part is occupied by a field `Attributes' for managing the attributes of a table, and the right part is used by a field `Display' for managing the project's gui elements.

Table management

In the `Tables' field of the structure editor you can create, change, delete and sort tables.

Creating tables

To create a new table press the `New' button in the `Tables' field. This will open the `New table' requester containing

When you are done with all settings, press the `Ok' button to create the new table. If you made an error somewhere, e.g. you entered an invalid name, a message window pops up giving you more information about the error you did. If everything goes fine, the `New table' requester will be closed and the new table is displayed in the structure editor's table list.

Changing tables

After you have created a new table you can still change it. Just double-click on the table's name and the `Change table' requester pops up. This requester is similar to the one when creating a table (see section Creating tables) and allows you to make changes in any field by entering a new value.

When you are done with all changes, press the `Ok' button to leave the requester.

Please note that you can't change the number of records from `Unlimited' to `Exactly one' if the table already contains more than one record.

Deleting tables

To delete a table, click on the table's name in the structure editor's table list, then press the `Del' button below the list. Before the table is actually deleted a safety requester pops up asking for confirmation. If you confirm this requester by pressing the `Delete' button, the table is deleted.

A problem occurs if the table is used somewhere in the project's program. In this case the table can't simply be deleted but all references to the table must be removed from the program. If the table you want to delete is used in the project's program then the program editor pops up and displays the first occurrence to the table. You should now modify the program such that no references to this table remain in the program. After you removed a reference you can jump to the next one by pressing the `Compile' button. At any point you can still cancel the whole operation by pressing the `Undo' button and closing the program editor.

Sorting tables

For sorting the tables in the `Tables' field of the structure editor you have two choices. You can either order them by hand, that is, you use drag & drop to rearrange a table, or you use the `Sort' button below the list-view which orders the tables alphabetically.

Attribute management

In the `Attributes' field of the structure editor you can create, change, delete and sort the attributes of the active table in the `Tables' field.

Creating attributes

To create a new attribute for the active table press the `New' button in the `Attribute' field. This will open the `New attribute' requester containing

When you are done with all settings, press the `Ok' button to create the new attribute. If you made an error somewhere, e.g. you entered an invalid name, a message window pops up giving you more information about the error you did. If everything goes fine, the `New attribute' requester will be closed and the new attribute is displayed in the structure editor's attribute list.

Type specific settings

In the type specific section the following settings can be specified:

Label editor

Whenever you have to define a list of labels, e.g. the list of labels for a choice attribute, the label editor comes into place. The label editor is a window containing:

After you entered all labels or made changes to them, press the `Ok' button to leave the window.

Changing attributes

After you have created a new attribute it is still possible to change some settings of it. Just double-click on the attribute's name and the `Change attribute' requester pops up. This requester is similar to the one when creating an attribute (see section Creating attributes) and allows you to make changes in some fields. The fields that cannot be changed, e.g. the attribute type, are displayed ghosted.

The following notes should be taken into account when changing the an attribute.

When you are done with all changes, press the `Ok' button to leave the requester.

Deleting attributes

To delete an attribute, click on it's name in the structure editor's attribute list and press the `Del' button below the list. Before the attribute is actually deleted a safety requester pops up asking for confirmation. If you confirm this requester by pressing the `Delete' button, the attribute is deleted.

A problem occurs if the attribute is used somewhere in the project's program. In this case the attribute can't simply be deleted but all references to it must be removed from the program. If the attribute you want to delete is used in the project's program then the program editor pops up and displays the first occurrence to this attribute. You should now modify the program such that no references to this attribute remain in the program. After you removed a reference you can jump to the next one by pressing the `Compile' button. At any point you can still cancel the whole operation by pressing the `Undo' button and closing the program editor.

Sorting attributes

For sorting the attributes in the `Attributes' field of the structure editor you have two choices. You can either order them by hand, that is, you use drag & drop to rearrange an attribute, or you use the `Sort' button below the list-view which orders the attributes alphabetically.

Display management

In the `Display' field of the structure editor you specify how the database elements should be arranged in the user interface. The field consists of a choice field, a list-view and several buttons.

Display field

The display field contains the following items:

For more information about the gui elements, including their usage, see section User interface.

Panel editor

When you add a panel to a table's mask, or when you double click an existing panel object in the display list-view, the `Panel' window pops up. This window contains the following items:

After you are done with all settings, click on the `Ok' button to close the window.

Attribute object editor

When you add an attribute to the display list-view, a default gui object is created for it. To change the settings of the attribute object, double click on it and the `Display attribute' window is opened. This window contains several items depending on the type of the attribute. The following items are included for most attribute types:

If you are done with all settings, press the `Ok' button to leave the window.

Type specific settings

Besides the above items, the following type-specific items are present:

Text editor

When you add a text object to the display list-view, or when you change one by double clicking on it, a window `Text' is opened. This window contains the following items:

When you are done with all settings, press the `Ok' button to leave the window.

Image editor

The image editor appears when you add a new image object or double click on an existing one. It contains the following items:

When you are done with all settings, click on the `Ok' button to close the window.

Space editor

After you have added a space object to the display list-view, you can change its default settings by double clicking on it. This will open the `Space' window containing the following items:

After you are done with all settings, press the `Ok' button to close the window.

Group editor

After you have added a group object to the display list-view, you can change its settings by double clicking on it. This will open the `Group' window offering the following items:

When you are done with all settings, press the `Ok' button to leave the window.

Register group editor

Double click on a register group object in order to change its settings. This will open the `Register group' window offering the following items:

When you are done with all settings, press the `Ok' button to leave the window.

Window editor

To change the settings of a window object, double click on it. This will open the window editor containing the following items:

When you are done with all settings, press the `Ok' button to close the window.

Print structure

Sometimes it is useful to get an overview of all tables and attributes of a project, e.g. when you want to write a MUIbase program. You can do this by selecting menu item `Project - Print structure'. This will ask you for a filename where the list of tables and attributes should be written to.

The output will first list the project name, followed by all tables in this project. For each table all attributes including their types are listed.


Go to the first, previous, next, last section, table of contents.