MUIbase Support This Project
programmable relational database
with graphical user interface
This page is also available in deutsch français

Documentation

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


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

9. Record-Editing

In this chapter you find:


9.1 Active Object

MUIbase uses a cursor for displaying which object is the active one. If the active object is a string object, the usual text cursor appears, other objects get a special frame around them. You can cycle through the active objects by pressing the Tab or Shift-Tab keys. If you press the Help or F1 key, an external viewer is loaded with helpful information about the active object.

The table in which the active object resides is called the active table. The panel of a table can be set to the active object. This ensures that you can always set a table to be the active one, although the table may not contain any other activate-able objects.

On Windows, Mac OS and Linux each table has a context menu containing menu items for manipulating the table. This context menu can be opened by pressing the right mouse button somewhere inside the table mask (but outside any other GUI object that has its own context menu).

On Mac OS and Amiga the table menu items are part of the global menu found at the top of the screen.


9.2 Adding Records

If you select menu item `Table - New record' a new record is allocated in the active table. The record is initialized with the initial values for all attributes. It is also possible to duplicate the current record of the active table by selecting menu item `Table - Duplicate record'.

If you have installed a trigger function for adding a new record (see Creating tables) then this trigger function is called for creating the record. For more information on this mechanism, See New trigger.


9.3 Changing Records

To change the current record in a table you can activate any attribute object within the table's mask and enter a new value. For string, integer, real, date, time, and memo attributes you can use the usual editing commands.

An attribute object may have been configured as read-only. In this case you can't change its value (exception: string attribute with pop-up button).


9.3.1 String Attributes with Pop-up Button

If a string attribute has a pop-up button attached to it then you can press the pop-up button and get a pop-up to set the string contents, e.g. a file dialog for choosing a filename, or a list of strings to choose one from. The pop-up button can always be used to set the string attribute's value even if the attribute is set to read-only.

Right to the string field another small button might appear. Pressing this button calls an external viewer to display the file specified in the string field.


9.3.2 Entering Integer Values

When entering an integer number, one can use an octal notation (leading 0) or hexadecimal notation (leading 0x) besides the usual decimal notation.


9.3.3 Entering Boolean Values

The checked state of Boolean attribute can be toggled with the left mouse button, or with the space bar if the object is the active one.


9.3.4 Entering Choice Values

For choice attributes you can choose a value by clicking onto it, or by using the Up and Down cursor keys to browse through all choice labels.


9.3.5 Entering Date Values

Date values can be entered in one of the formats `DD.MM.YYYY', `MM/DD/YYYY' or `YYYY-MM-DD', where `DD', `MM' and `YYYY' are standing for two and four digit values representing the day, month and year of the date respectively. It is possible to omit the year value of a date. In this case the current year is used.

By inserting a single integer value, a date value relatively to the current date can be specified, e.g. when entering `0' the today's date is used, or when entering `-1' yesterday's date is used.


9.3.6 Entering Time Values

The format for entering time values is specified in the structure editor (see Attribute object editor). Possible formats are `HH:MM:SS', `MM:SS' or `HH:MM' where `HH' represent the hours, `MM' the minutes, and `SS' the seconds.

It is possible to omit parts of the format, e.g. entering `6:30' under the format `HH:MM:SS' automatically expands to `00:06:30'. When entering a single number, it is regarded as the number of seconds (formats `HH:MM:SS' and `MM:SS') or as the number of minutes (format `HH:MM') respectively, and the corresponding time value is computed.


9.3.7 Memo Context Menu

Memo attributes have a context menu that offers further editing possibilities:

  • `Cut', `Copy', and `Paste' allow exchanging data with the clipboard.
  • `Delete' erases selected text and `Select all' allows to select all text (Windows, Mac OS and Linux).
  • `Clear' deletes all text in the memo (Amiga).
  • `Undo' and `Redo' allow going back and forth the changes you made to the memo contents (Amiga only).
  • `Input methods' and `Insert unicode control character' are GTK-specific menu items (Windows, Mac OS and Linux). Please refer to the GTK documentation.
  • With `Open text' and `Save text' you can load and save the memo contents from/into a file.
  • `External editor' launches an external editor for editing the memo. See External editor, for more information about the external editor.


9.3.8 Select-from-where List Context Menu

Virtual attributes with the `List' kind have a context menu containing the following entries:


9.3.9 Entering Reference Values

For reference attributes the record reference can be entered through a pop-up list:

  • To the right of a reference attribute you find a pop-up button which, if pressed, opens a list of records. Choose a record from the list to set the reference to this record, `Initial' to set the reference to the NIL value, or `Current' to set the reference to the current record of the referenced table.
  • You can search for an entry in the referenced table by using the keyboard. After the first key press an input field is opened allowing to enter more characters for the search pattern. After each key press, a search is started immediately (case-insensitive) and the first matching entry is selected. The search method can be specified in the display object of the attribute (see Attribute object editor) under the `Quick search' category. You can use the characters `*' for matching an arbitrary sequence of characters and `?' for matching exactly one arbitrary character. Using the cursor keys Down and Up, the next respectively previous matching entry is selected. A selected entry is stored when acknowledged by pressing the Enter key. If you leave the search window by other means, e.g. pressing Esc, then the attribute stays unchanged and keeps its previous value.

A reference attribute can also be set by dragging a line from a list of a virtual attribute and dropping it onto the reference field. If the dragged line was generated from a record of the referenced table then this record is used as the new record reference.


9.3.10 Entering NIL Value

To enter the NIL value, enter any invalid string for the given attribute type, e.g. if you enter `xyz' in an integer attribute then the value of this attribute is set to NIL. Please note that not all attribute types support the NIL value. See Table of attribute types, for an overview of all attribute types.


9.4 Deleting Records

To delete the current record chose menu item `Table - Delete record'. Before deleting the record a dialog may appear asking you for confirmation. You can enable and disable this dialog in the preferences settings (see Confirm delete record).

If you have installed a trigger function for deleting records (see Creating tables) then this trigger function is called for deleting the record. For more information on this mechanism, see Delete trigger.

It's also possible to delete all records of a table by choosing menu item `Table - Delete all records'. Only records matching the record filter of the corresponding table are deleted. Before deletion a confirmation dialog appears, if enabled. No trigger function is called when deleting all records.


9.5 Browsing Records

To view other records than the currently displayed one, select one of the sub menu items in menu item `Table - Goto record'. You can go to the previous, next, first, or last record, jump several records backward or forward, or enter the record number of the record you want to view. The record number in this context is the number that is displayed in the corresponding panel for that record (see Panels). The panel may also include two arrow buttons for going to the previous and next record.

Record browsing can be easily done using the Up and Down cursor keys in combination with the Shift, Alt, Command and Ctrl keys. All possible combinations are listed in menu item `Table - Goto record'. On Windows, Linux and Amiga the combinations are:

 

         Alt                 Shift-Ctrl         Shift-Alt

Up       Previous record     First record       Jump backward

Down     Next record         Last record        Jump forward

On Mac OS the combinations are:

 

         Command             Ctrl-Command       Shift-Command

Up       Previous record     First record       Jump backward

Down     Next record         Last record        Jump forward


9.6 View all Records

It is possible to view all records of a table by choosing menu item `Table - View all records'. This opens the query editor with a pre-defined query for listing all records of the current table. You can modify the query and its title, and MUIbase will remember the query. For more information, see Query editor.


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

This document was generated on September, 11 2016 using texi2html