BeeBase

Programmable relational database
with graphical user interface Support This Project
This page is also available in Deutsch Français

Documentation

Below documentation is part of the BeeBase dictribution and is also available in PDF.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

15. Structure Editor

BeeBase 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, fields 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 closes all windows and opens 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 `Fields' for managing the fields of a table, and the right part is used by a field `Display' for managing the project's GUI elements.


15.1 Table Management

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


15.1.1 Creating Tables

To create a new table press the `New' button in the `Tables' field. This will open the `New table' dialog 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' dialog will be closed and the new table is displayed in the structure editor's table list.


15.1.2 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' dialog pops up. This dialog is similar to the one when creating a table (see 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 dialog.

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.


15.1.3 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 dialog pops up asking for confirmation. If you confirm this dialog 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 `Revert' button and closing the program editor.


15.1.4 Sorting Tables

For sorting the tables in the `Tables' field of the structure editor you have several choices. You can order them manually, 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 (`Sort1'), or according to the order in the list display (`Sort2').


15.2 Field Management

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


15.2.1 Creating Fields

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

When you are done with all settings, press the `Ok' button to create the new field. 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 field' dialog will be closed and the new field is displayed in the structure editor's field list.


15.2.2 Type Specific Settings

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


15.2.3 Label Editor

Whenever you have to define a list of labels, e.g. the list of labels for a choice field, 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.


15.2.4 Copying Fields

In case you need a lot of similar fields, it is possible to copy a field. Just select the desired field and press the `Copy' button below the field list. This opens the `Copy field' dialog where the settings of the selected field are displayed. Change some of the fields, e.g. the name, and then press `Ok' for creating a copy of the field.


15.2.5 Changing Fields

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

The following notes should be taken into account when changing a field.

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


15.2.6 Deleting Fields

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

A problem occurs if the field is used somewhere in the project's program. In this case the field can't simply be deleted but all references to it must be removed from the program. If the field you want to delete is used in the project's program then the program editor pops up and displays the first occurrence to this field. You should now modify the program such that no references to this field 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 `Revert' button and closing the program editor.


15.2.7 Sorting Fields

For sorting the fields in the `Fields' field of the structure editor you have several choices. You can order them manually, that is, you use drag & drop to rearrange a field, or you use the `Sort' button below the list-view which orders the fields alphabetically (`Sort1') or according to the order in the list display (`Sort2').


15.3 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.


15.3.1 Display Field

The display field contains the following items:

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


15.3.2 Table Object Editor

When adding a table a default display object is created. To change the settings of the table object, double click the table in the `Display' list and the `Display table' window appears. The window has three sections that are separated into the tabs `General', `Panel' and `Record'.

The `General' section contains the following items:

The `Panel' section is only enabled if the `Has panel' field has been checked. It contains the following items:

The `Record' section allows to specify a record description. The record description is used when creating log entries and in list popups for selecting a record. It should be a short but unique identification. The section contains the following items:

Below the tab-separated sections there are two buttons `Ok' and `Cancel' for leaving the window. After you are done with all settings, click on the `Ok' button to close the window.


15.3.3 Field Object Editor

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

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


15.3.4 Type Specific Settings

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


15.3.5 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.


15.3.6 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.


15.3.7 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.


15.3.8 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.


15.3.9 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.


15.3.10 Window Editor

To change the settings of a window object, double click the window object. 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.


15.4 Export Structure

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

The output will first list the project name, followed by all tables in this project. For each table all fields including their types and their optional trigger functions are listed. For virtual fields also the dependencies for automatically updating the value of the virtual field are listed.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated on August, 22 2022 using texi2html