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 | How to add, change and delete tables. | |
15.2 Field management | Adding, changing, and deleting fields. | |
15.3 Display management | Managing the project's GUI elements. | |
15.4 Export structure | Getting an overview of all tables and fields. |
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 | How to add a table. | |
15.1.2 Changing tables | How to modify a table. | |
15.1.3 Deleting tables | How to remove a table. | |
15.1.4 Sorting tables | How to order the list of 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
- a string field for entering the name of the table.
Each table must have a unique name that starts with an uppercase letter
followed by further letters, digits or underscore characters.
Non-ASCII characters like German umlauts are not allowed.
Please note that in the user interface for the table it is still possible
to display any strings including strings with non-ASCII characters.
- a field `Number of records' where you specify how many records
the table is going to hold. `Unlimited' means that the table
can hold any number of records, `Exactly one' means that the table
can have only one record. The latter one is sometimes useful for
controlling the project (see Tables).
- a field `Trigger functions' where you can enter the names of two functions.
In the `New' string field you enter the name of the function that should
be called whenever the user wants to create a new record, the `Delete'
string field holds the name of the function that should be called whenever the
user wants to delete a record. You can use the pop-up buttons to the right
of the string fields for choosing a function name from a list of all names.
If you leave a field empty then default actions are executed (records are created
automatically and records are deleted after an optional confirmation dialog).
For more information on how to use these trigger functions, including the
arguments that are passed to them, see New trigger and Delete trigger.
- a check-mark field `Count changes' that, if selected, makes any
creation or deletion of a record count as a change to the project.
If not selected then any change in the table
(or in any of the table's fields) is ignored.
- a check-mark field `Log changes'.
If selected, any creation or deletion of a record
is recorded in the project log.
Otherwise, no change in the table (or in any of the table's fields)
is ever logged.
- two buttons `Ok' and `Cancel' for leaving the dialog.
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 | How to add a field. | |
15.2.2 Type specific settings | Settings depending on the type of a field. | |
15.2.3 Label editor | Specifying label strings, e.g. for choice fields. | |
15.2.4 Copying fields | Making copies of a field. | |
15.2.5 Changing fields | How to modify a field. | |
15.2.6 Deleting fields | How to remove a field. | |
15.2.7 Sorting fields | How to order the list of fields. |
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
- a string field for entering the name of the field.
Each field in a table must have an unique name that starts with an uppercase letter
followed by further letters, digits or underscore characters.
Non-ASCII characters like German umlauts are not allowed.
Please note that in the user interface it is still possible
to display any strings including strings with non-ASCII characters
for the field.
- a choice field `Type' where you specify the type of the field.
For more information on field types, see Field types.
- a section below the `Type' field for specifying type specific
settings. For more information about this section, see Type specific settings.
- a field `Trigger' where you can enter the name of a function
that should be called whenever the user wants to change the contents
of the field in a record.
You can use the pop-up button to the right of the string field for
choosing a name from a list of all function names.
If you leave the field empty then a default action is executed, that is,
the entered value is simply stored in the field.
For more information on how to use the trigger function, including the
arguments that are passed to it, see Field trigger.
- a field `Count changes'. If checked, every change to the
field in a record counts as a change of the project.
Uncheck this item, if you want to ignore changes to a field.
Note that this item is only enabled when also the `Count changes'
item in the table has been set (see Creating tables).
- a field `Log changes', that, if checked, logs any change made
to the field in a record.
Note that this item is only enabled when also the `Log changes'
item in the table has been set (see Creating tables).
- two buttons `Ok' and `Cancel' for leaving the dialog.
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:
- For fields of type string you have
- an integer field `Max length' for entering the maximum number of
characters for the string field.
- a string field `Initial value' for specifying the value that is used for
initializing the field.
Any string up to the specified maximum length can be entered here.
- an integer field `Max length' for entering the maximum number of
characters for the string field.
- For fields of type integer, real, date, and time the type specific section offers
- a field `Initial value' where you specify the value for initializing
the field. You can choose between `NIL' and `other'.
If you select `other' then you should enter the initial value into the
string field on the right.
- a string field `NIL string' where you enter the string that should be
displayed when the field holds the NIL value.
- a field `Initial value' where you specify the value for initializing
the field. You can choose between `NIL' and `other'.
If you select `other' then you should enter the initial value into the
string field on the right.
- For Boolean fields the type specific section contains a field
`Initial value' where you can choose between `NIL' and
`TRUE' for the initial value.
- The type specific section for choice fields offers
- a button `Edit labels' for opening the
`Edit labels' window where you can enter
the label strings for the choice field (see Label editor).
- a choice field `Initial value' for specifying
the value for initializing the field.
- a button `Edit labels' for opening the
`Edit labels' window where you can enter
the label strings for the choice field (see Label editor).
- For reference fields the type specific section contains
- a list-view displaying all tables for specifying to which table
the reference should be made. Click on the table the field is going
to reference.
- a field `Auto show'. If checked, the referenced
table gets updated automatically with the referenced record
whenever the user switches to another record.
- a field `Filter'. If checked, the reference filter
of this field is turned on. See Reference filter,
for more information about this feature.
Reference fields always have the NIL value as initial value.
- a list-view displaying all tables for specifying to which table
the reference should be made. Click on the table the field is going
to reference.
- The type specific section for virtual fields contains
- a string field `Compute' where you enter the name
of a function that should be called for calculating
the value of the field. You can use the attached pop-up
button for selecting a name from a list of all function names.
For more information on how to use this function,
see Programming virtual fields.
- a string field `NIL string' where you enter the string that should be
displayed when the field holds the NIL value.
- a string field `Compute' where you enter the name
of a function that should be called for calculating
the value of the field. You can use the attached pop-up
button for selecting a name from a list of all function names.
For more information on how to use this function,
see Programming virtual fields.
- Memo and button fields do not have any type specific settings.
The initial value for memo fields is an empty string.
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:
- a list-view displaying the current list of labels. You can click
on a label to make it the active one. The active label is also displayed in
the string field below the list-view. You can use drag & drop to rearrange
the labels.
- a string field `Label' that displays the active label and allows
changing it.
The changes do only have effect after you pressed the Enter key.
If there is currently no active label then pressing Enter inserts
new labels into the list.
- a button `New' that deactivates the current label which allows
entering new labels into the `Label' string field.
- a button `Remove' that removes the active label from the list.
- a button `Sort' for ordering the list of labels alphabetically.
- two buttons `Ok' and `Cancel' for leaving the label editor.
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.
- The type of a field cannot be changed.
If you ever want to change the type of a field, it is best to create a
new one of the desired type and copy the record contents from
the old field to the new one by entering a simple BeeBase program
in the query editor (see Query editor).
- If you change the initial value of a field then
only new records will get the new value for initializing the record.
- For choice fields you should be careful when changing its labels.
The labels are only used for displaying the choice field contents,
internally, numbers are stored that are used as an index into the
list of labels. Thus, if you change the order of labels, you actually
don't change the internal number but the label which is displayed for it!
Therefore you should not change the order of labels after you created
a choice field. Appending new labels to the end of the label list,
however, doesn't make any problems.
For a more flexible way of having a choice-like field where you can also
change the order of labels, use a string field together with the
`List-view pop-up' feature (see Field object editor).
- The referenced table of a reference field cannot be changed.
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 | Overview of the elements in the display field. | |
15.3.2 Table object editor | Settings for a table object. | |
15.3.3 Field object editor | Settings for a field object. | |
15.3.4 Type Specific Settings | Settings for an specific object. | |
15.3.5 Text editor | Settings for a text object. | |
15.3.6 Image editor | Settings for an image object. | |
15.3.7 Space editor | Settings for a space object. | |
15.3.8 Group editor | Settings for a group object. | |
15.3.9 Register group editor | Settings for a register group object. | |
15.3.10 Window editor | Settings for a window object. |
15.3.1 Display Field
The display field contains the following items:
- a choice item with two settings, `Table mask'
and `Main window'. In `Table mask' you specify
how the fields of the active table are arranged in the user interface.
In `Main window' you specify how the tables are arranged.
- a list-view that displays the current specification
of the user interface. The list is organized as a tree.
Items that have an arrow to its left are composite GUI objects
and can be opened and closed by (double-) clicking on the arrow symbol.
A double-click on the item itself opens a window for editing its settings.
All GUI objects that have the same parent object are laid out
in the same way (either vertically or horizontally).
How the layout is done is determined by the parent GUI object:
tables and windows layout their elements vertically,
groups layout their elements according to the settings
in the group editor (see Group editor).
- a button `+' (`Add')
for adding the active table or the active field
(depending on the state of the display choice field) to the display list-view.
Usually tables and fields are added to the display list-view automatically
when you create them.
- a button `-' (`Rem')
for removing the active item from the display list-view.
If you remove a table then the whole table form
is removed from the user interface,
thus you can't see the table in the project's GUI.
This way you can hide entire tables.
If you remove a field from the display list-view then the field
doesn't appear in the project's GUI. This is useful for hiding fields.
- two buttons `Up' and `Down' for moving the active item one field up,
respectively down, in the display list-view.
- two buttons `In' and `Out'
for moving the active item one hierarchical level down or up in the display list-view.
- a button `Text' for adding a text object to the display list-view
(see Text editor).
- a button `Image' for adding an image object (see Image editor).
- a button `Space' for putting space between the other objects
(see Space editor).
- a button `Balance' for adding a balance object to the display list-view.
The balance object is useful for controlling the size of the other GUI objects.
- a button `Group' for adding a group object to the display list-view.
Before you press the `Group' button you can multi-select the items in
the list-view that should be moved into the new group (see Group editor).
- a button `Register' for adding a register group to the
display list-view.
As for group objects, you can multi-select the GUI objects that should
be moved into the new register group (see Register group editor).
- a button `Window' for adding a new window to the display list-view.
As before, you can multi-select the GUI objects that should
be moved into the new window (see Window editor).
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:
- a numerical field `Weight' for specifying the weight of the object.
The value of this field determines how much space, relative to the
other objects, the table gets in the final window layout.
- a field `Background' with a check-mark field `Default'
for specifying how the background of the table should look like.
If you check the `Default' field then a default background is used,
otherwise you can click on the `Background' field to open a window
for specifying a custom background.
- a check-mark field `Has panel' that specifies whether a
panel should be displayed at the top of the table.
Uncheck this field for hiding the panel.
For more information about panels, see Panels.
The `Panel' section is only enabled if the `Has panel' field has been checked. It contains the following items:
- a string field `Title' for entering a title that should be displayed
in the panel header.
- a string field `Font' with a pop-up button
for selecting a font for the title. If you leave the field empty,
a default font is used.
- a field `Background' with a check-mark field `Default'
for specifying the background of the panel header. If you check the
`Default' field then a default background is chosen.
Otherwise you can click on the `Background' button to open a
window for specifying a custom background.
- a field `Num/All'. If checked the number of the current
record and the number of all records are displayed in the right part
of the panel header.
- a field `Filter' that, if checked, adds a filter button
to the panel header. With the filter button you can turn on and off
the record filter of the table. If you don't check this field then
the menu item `Table - Change filter' will also be disabled for this table,
thus you can't enter a filter expression for the table.
For more information about record filters, see Record filter.
- a field `Arrows' for adding two arrow buttons to the
table mask. The arrow buttons allows you to browse through the records
of the table. If you don't check this field then you can't browse
the records of this table and all sub menu items of menu item
`Goto record' and the menu items `Search for', `Search forward',
and `Search backward' in menu `Table' are disabled.
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:
- a choice field `Description' that can be set to either
`Fields' or `Computed'.
- if `Description' is set to `Fields' then a list of
fields of the table are shown.
You can choose any of the items for the record description.
If you select `Record number' than the record number
of a record is included in the display.
Multiple items can be selected and
you can rearrange the order of items by drag and drop.
- if `Description' is set to `Computed' then
a field `Compute' is shown for entering a function
that computes the record description.
The function can either return a single expression or a list of expressions
(see Compute record description).
- a check-mark field `Use multi-column list' for specifying a
preference of how to arrange the list items when presented in a list-view.
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:
- a string field `Title' for entering a title that is displayed
near the field object (or, for buttons, inside the object).
If you leave this field empty then no title is displayed.
- a choice field `Position' for specifying
where the title (if any) is placed relative to the field object.
You can choose between `Left', `Right', `Top',
and `Bottom'.
- a field `Font' for selecting the font used for the title.
If you leave the field empty, a default font is used.
- a string field `Shortcut' for entering a letter than can be used
together with the Alt key (Windows, Mac OS and Linux)
or the Amiga key to activate the object.
- a field `Home'.
If checked, this field object becomes the home object.
The home object is used as the object where the cursor is set on
whenever a new record is allocated. This is quite useful if you
always want to start entering data into the same field whenever
you create a new record.
If you mark a field object as the home object then all other
field objects in the same table loose this property.
- a field `Tab chain'. If checked the object is part of the focus
chain that can be cycled through by pressing the Tab key.
Uncheck this item if you want to skip over the element.
- a field `Read only' that, if checked, gives the object a
read only status.
This means that you can only read its contents but can't edit them.
Note however, that if you add a pop-up button to the object,
the contents can still be changed by the selections offered in the pop-up.
- a choice field `Alignment' for specifying how the field contents
should be presented in the object. You can choose between
`Center', `Left' and `Right' for displaying the
contents centered, flushed left, or flushed right.
- a numerical field `Weight' for specifying the weight of the object.
The value of this field determines how much space, relatively to the
other objects, the object gets in the final window layout.
For most field types this field only affects the horizontal size
of the object as most objects have a fixed height.
For a Memo field, for example, it also affects the vertical size.
- a field `Font' for selecting the font used for
displaying the field contents. If you leave the field empty,
a default font is used.
- a field `Background' with a check-mark field `Default'
for specifying how the background of the field should look like.
If you check the `Default' field then a default background is used,
otherwise you can click on the `Background' field to open a window
for specifying a custom background.
- an editor field `Bubble help' where you can enter text that
should be displayed as the bubble help information for this field object.
- an area `Enabled/disabled'.
If `Always enabled' is selected then the object is always enabled
independent of the record shown.
`Disabled in initial' disables the object in the initial record but
enables it otherwise.
If `Compute enabled' is chosen then a function for computing the enabled
state of the object can be entered to the right.
The function does not take any arguments.
If it returns NIL then the object is disabled, otherwise enabled.
In case the compute function is left empty or cannot be found,
the object gets disabled.
For more information on how to use this trigger function,
see Compute enabled function.
- two buttons `Ok' and `Cancel' for leaving the window.
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:
- for fields of type string there is an `Extras' page which
contains:
- a field `Display picture' that, if checked, attaches an image field
to the string field for displaying the image whose filename is taken from
the field contents. The image field is put above the string field.
If you don't check this item then the settings
of the fields `Title at string field', `Hide string field',
and `Size' are meaningless.
- a field `Title at string field'. If checked, the title of the field object
is placed to the left of the string field, thus the image field gets more space in the window.
If you don't check this field then the title is placed next to the image field.
- a field `Hide string field' for removing the string field from the user interface.
If checked, only the image field is displayed.
- a field `Size' for specifying how size-handling is done for the image area.
If `Resizable' is active, the object can be resized and might
become larger than the size of its image.
`Fixed' sets the object's size to the size of the image.
If the image sizes vary from record to record then the object is resized
accordingly every time.
`Scrollable' adds two scrollers to the object allowing to view images
that are larger than the visible region.
If `Scaled' is activated then the image is scaled to the size
of the display object.
`Aspect-scaled' also scales the image but preserves its aspect ratio.
- a field `File pop-up' that, if checked, adds a pop-up button
to the right of the string field. This buttons serves to open a file dialog
for choosing a filename.
- a field `Font pop-up' for adding a pop-up button that opens
a font dialog.
- a field `List-view pop-up'. If checked, a pop-up button is
attached to the right of the string field for opening a list-view pop-up
where you can choose a string from a list.
The label strings for the list-view pop-up are defined to the right
of the `List-view pop-up' field.
The label items can be either `Static' or `Computed'.
If `Static' is chosen then the list of strings can be entered in
the label editor which is opened after pressing the `Edit labels' button.
For more information about the label editor, see Label editor.
If `Computed' is chosen then a trigger function can be entered in
the `Compute' field which is called whenever the pop-up button is pressed.
This function should return a memo text with one label string per line,
or NIL for an empty list (see Compute list-view labels).
Only one of the fields `File pop-up', `Font pop-up' and
`List-view pop-up' can be made active.
- a field `View' that, if checked, adds a button to the right of the string field
for launching an external viewer with the field contents as argument.
This can be useful if you store filenames in the field and want to display the
contents of a file by starting an external viewer.
The external viewer can be specified in menu item `Preferences - External viewer'
(see External viewer).
- a field `Display picture' that, if checked, attaches an image field
to the string field for displaying the image whose filename is taken from
the field contents. The image field is put above the string field.
If you don't check this item then the settings
of the fields `Title at string field', `Hide string field',
and `Size' are meaningless.
- for fields of type choice there is a field `Kind'
where you choose whether the field contents should be displayed
by a `Cycle button' or by a set of `Radio buttons'.
If you select `Cycle button' then you can set the title position
to one of `Left', `Right', `Top', or `Button'.
If you select `Radio buttons' then two check mark items
`Frame' and `Horizontal' allow drawing a border around
the radio buttons and specifying a horizontal layout.
- for fields of type real there is an integer field `Num decimals'
where you can enter the number of decimals for displaying the floating point values.
- for fields of type date there is a check mark field `Calendar'
that adds a pop-up button to the right of the date field for opening a calendar.
- for fields of type time there is a choice field `Format'
for choosing how time values are displayed and entered.
You can select between `HH:MM:SS', `MM:SS' and `HH:MM'.
If `HH:MM' is chosen, the number of seconds are discarded for display
and single numbers on input are regarded as the number of minutes.
- for reference fields there is an `Extras' page that contains the
following items:
- a `Display' section where you enter a record description
which specifies the contents of a referenced record to be displayed.
See Table object editor, for information on how
to setup a record description.
Note that the `Description' choice field
also offers a `From table' entry.
If selected, the settings of the table object are used
for displaying a referenced record.
- an area `Pop-up' where you specify which records
of the referenced table should be made available for selection
in the pop-up of the reference field and how they should be displayed.
If `Records' is set to `All' then all records are available.
If `Records' is set to `Match filter' then only the records
of the referenced table that match the currently installed filter are available.
If `Records' is set to `Computed' then a function for computing the
set of records can be entered in the `Compute' field.
This trigger function should return a list that is searched for the occurrence
of records of the referenced table.
Any such record found is shown in the pop-up. Non-record items are ignored.
See Compute reference records, for more information about this function.
In addition to the records specified by the `Records' setting,
the initial record and the currently shown record in the referenced table
can be added to the pop-up list by activating the `Initial record'
and `Current record' items respectively.
- a field `Show'. If checked then the GUI object for displaying the
reference is created as a button. Clicking on this button will show you the
referenced record in the table mask of the referenced table.
For this the window the referenced table resides in is opened and
brought to front if necessary.
- a field `Auto show' that, if checked, adds a button to the right
of the reference field for turning auto show mode on and off
for this field. When turned on, the referenced table gets updated
automatically with the referenced record whenever the user switches
to another record.
- a field `Filter' that, if checked, adds a button to the right of the
reference field for turning on and off the reference filter for this field.
See Reference filter, for more information about reference filters.
- a `Display' section where you enter a record description
which specifies the contents of a referenced record to be displayed.
See Table object editor, for information on how
to setup a record description.
Note that the `Description' choice field
also offers a `From table' entry.
If selected, the settings of the table object are used
for displaying a referenced record.
- for virtual fields the field object editor contains
an `Extras' page with the following items:
- a choice field `Kind' where you specify how the contents of the virtual field
should be displayed. You can choose between `Boolean' that uses a check-mark field
for displaying Boolean values, `Text' that uses a text field for displaying one
line of text (including date, time, and numerical values), and `List' which uses
a list-view for displaying a list of lines (e.g. the result of a select-from-where query).
- if you set the `Kind' field to `Text' then two further fields are
available: `Alignment' for specifying how the field contents should be presented
and `Num decimals' for entering the number of decimals that should be used
if the field contents are of type real.
- if the `Kind' field has been set to `List'
then further fields `Show titles', `Tab chain', `Control table',
`On double click', `Trigger function on URL drop', and
`Trigger function on sort drop' are available.
If `Show titles' is checked, the first line of the field contents
is displayed as a title row in the list-view.
Otherwise no title row is displayed and the first line is ignored.
If `Tab chain' is checked, the object is part of the focus
chain that can be cycled through by pressing the Tab key.
Uncheck this item if you want to skip over the element.
If `Control table' is checked then the list controls a table.
The table is determined by the first column that has been generated from
a field of the table.
In that mode, when changing the active line in the list,
the table shows the corresponding record, and when pressing the arrow buttons
in the table's panel, the active line in the list moves accordingly.
In `On double click' you can specify which action should take place
when the user double-clicks a list item. `Do nothing' ignores the
double click. `Show record' displays the record corresponding to the
clicked item in the corresponding table view. If you select `Call trigger'
then the name of a trigger function can be entered to the right. This trigger
function is called on each double click. For more information about the
trigger function, including the arguments that are passed to it,
see Double click trigger.
In `Trigger function on URL drop' you can enter the name of a
trigger function that is called when the use drags and drops a list of
URLs (e.g filenames) onto the list view.
This can be used, for example, for storing external filenames in a project.
See URL drop trigger for more information about this trigger function,
including the arguments that are passed to it.
In `Trigger function on sort drop' you can enter the name of a
trigger function that is called when the use drags and drops an item for
sorting items in the list view.
This can be used, for example, for changing the order of records in a table
or for rearranging lines in a memo field.
See Sort drop trigger for more information about this trigger function,
including the arguments that are passed to it.
- a field `Auto update'.
If checked, the virtual field is recomputed automatically
whenever a dependent item changes.
This includes switching to a different record in a dependent table,
changing a dependent field,
adding or deleting a record in a dependent table,
changing the user/admin mode of the project,
or recompiling the project program.
The dependencies for the virtual field are obtained automatically
from the virtual field's compute function. Use menu item
`Project - Export structure' for viewing all obtained dependencies
(you might need to recompile the project's program in order to update
the dependencies when you turn this feature on).
Note that the virtual field is recomputed irrespective of the record
a dependent field is changed in and irrespective of whether the
dependent field's value was changed in the user interface or during
a program execution. However, the auto-updating of virtual fields
usually happens only after all other program executions are completed.
If `Auto update' is unchecked, the value of the virtual field
is only computed when it is explicitly queried or set in a program function.
- a choice field `Kind' where you specify how the contents of the virtual field
should be displayed. You can choose between `Boolean' that uses a check-mark field
for displaying Boolean values, `Text' that uses a text field for displaying one
line of text (including date, time, and numerical values), and `List' which uses
a list-view for displaying a list of lines (e.g. the result of a select-from-where query).
- For buttons there are the following additional fields:
- a choice field `Kind' where you choose between `Text button' and
`Image button'.
- if you set the button kind to `Text button' then further fields
`Title', `Font', `Background' and `Default' appear for
entering the text to be displayed in the button, the font used for
displaying the text, and the background settings.
- if the button kind has been set to `Image button' then a field
`Image' for specifying the image to be displayed and
a field `Size' for specifying the size-handling of the image button
are offered.
- a choice field `Kind' where you choose between `Text button' and
`Image button'.
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:
- a string field `Title' for entering the text that should be displayed.
- a numerical field `Weight' for specifying the horizontal
weight of the text object.
- a choice field `Font' for specifying the font of the text.
If you leave this field empty, a default font is used.
- two fields `Background' and `Default' for specifying the
background settings of the text object.
- two buttons `Ok' and `Cancel' for leaving the window.
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:
- a field `Weight' for specifying the weight of the image object in
the final window layout.
- a field `Image' for specifying the image that should be displayed.
- a field `Size' where you specify how resize-handling should be done.
If you select `Resizable' then the image object can be resized.
`Fixed' sets the object size to the size of the displayed image.
- two buttons `Ok' and `Cancel' for leaving the window.
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:
- a field `Delimiter' that, if checked, displays a vertical or horizontal bar
(depending on the layout of the parent object) in the center of the space object.
This is useful for separating parts in the window layout.
- a numerical field `Weight' for specifying the weight of the object.
- two fields `Background' and `Default' for specifying the
background settings.
- two buttons `Ok' and `Cancel' for leaving the window.
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:
- a string field `Title' for entering a title string that should be
displayed centered above the group. If you leave this field empty then
no title is displayed.
- a numerical field `Weight' for specifying the weight of this object.
- two fields `Background' and `Default' for specifying the
background settings.
- a field `Border' that, if activated, draws a border frame around the group.
- a field `Horizontal'. If checked, the layout of the group is done
horizontally and the group is listed in the display list-view as `HGroup'.
Otherwise the group is organized vertically and the display list-view will show
a `VGroup' for this group.
- a field `Spacing' that, if checked, adds some space between the group's
child objects. Otherwise no space is put between the objects.
- two buttons `Ok' and `Cancel' for leaving the window.
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:
- a numerical field `Weight' for specifying the weight of this object.
- an area `Labels' for specifying the label of each register page.
You should specify exactly the same number of labels as there are
elements in the register group. For more information on how to
enter and edit the labels, see Label editor.
- two buttons `Ok' and `Cancel' for leaving the window.
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:
- a string field `Title' where you enter a string that should be displayed
in the window title bar and in the optional window button.
- a string field `Id' (Amiga only) which can hold up to four
characters defining the MUI window id.
If an id is entered, the window position and size can be saved using
MUI's snapshot window facility.
Note that all ids defined within BeeBase should be unique.
If you accidentally reuse an already taken id then the windows will share
the same settings for their window dimensions.
Ids beginning with an underscore `_' are reserved for internal use.
If you leave the field empty then no MUI window id is set and the
window dimensions are stored in the project file.
The main window always has the first four characters of the project name
as its window id.
Specifying an window id is useful if a project is edited under different
system configurations as the window positions are then taken from the
individual configuration.
- a field `Button' that, if checked, places a button for opening
the window into the parent window. If this item is not checked then
the window can only be opened from a BeeBase program using the
SETWINDOWOPEN function (see SETWINDOWOPEN).
The following items specify the appearance of the window button.
- a string field `Shortcut' where you enter the shortcut for
activating the window button.
- an area `Enabled/disabled'.
If `Always enabled' is selected then the window button is always enabled.
`Disabled in initial' disables the button if it is inside a table
and the table shows its initial record, otherwise it is enabled.
If `Compute enabled' is chosen then a function for computing the enabled
state of the window button can be entered to the right.
The function does not take any arguments.
If it returns NIL then the button is disabled, otherwise enabled.
In case the compute function is left empty or cannot be found,
the window button gets disabled.
For more information on how to use this trigger function,
see Compute enabled function.
Additionally if the field `Close window when disabled' is checked then
the window is closed automatically when the button gets disabled.
- a numerical field `Weight' for specifying the weight of the
window button.
- a field `Font' for selecting the font of the window button.
If you leave the field empty, a default font is used.
- two fields `Background' and `Default' for specifying the
background settings of the window button.
- two buttons `Ok' and `Cancel' for leaving the window.
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 September, 30 2024 using texi2html