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

8. Record-Editing

In this chapter you find:

8.1 Active object  Where your input goes.
8.2 Adding records  How to add new records to a table.
8.3 Changing records  How to edit record contents.
8.4 Deleting records  If you don't need some records any more.
8.5 Browsing records  How to view other records.


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


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


8.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).


8.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 requester to set the string contents, e.g. a file-requester 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.


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


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


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


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


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


8.3.7 Memo Context Menu

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


8.3.8 Entering Reference Values

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


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


8.4 Deleting Records

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

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 safety requester appears, if enabled. No trigger function is called when deleting all records.


8.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, and Ctrl keys. All possible combinations are listed in menu item `Table - Goto record' and in the following table:

 

         Alt                 Shift-Ctrl         Shift-Alt

Up       Previous record     First record       Jump backward

Down     Next record         Last record        Jump forward


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

This document was generated on May, 27 2010 using texi2html