1. Create a Table

When you launch Sfairadora for the first time, you should see a document main window on the screen. If not, you can create a new document using the File|New|Empty menu command. The document is empty except for an element named table displayed in the upper left corner in the Data section. This table serves only as an example; you will not need it, so you should remove it first:
Click the table item in the Data section in the left pane to activate it.
Press the Delete key (or the button in the tool bar) to delete the table.

Create a New Table

Create a table containing the required columns for the CD store:
Double-click the new data item in the left pane in the Data section. (You can also activate the item by using the arrow keys and press Enter on it).
A dialog with Data type heading appears, where you can specify the name of the created data item (table) and its data type.
Enter a name for the table into the name field, for example, cd_list. The data item name must respect the conventions of identifiers – that is, it must not contain spaces (you can use underscores instead). Nonetheless, it may contain characters with diacritical marks.
In the data type listbox, select the Table, sequence option. When you have selected this option, additional items appear in the window under Table properties heading.
For now, skip all the displayed table properties, and fill in only the table called Structure items at the bottom. Each row defined here will represent one column of the created table. Every column must be assigned a name (must be an identifier – see the notes under point 3), a data type determining the values that can be inserted into the column (use String – any text, Integer number, and Real number). You can also specify that entering a value is optional – that is, the value need not be specified, and the cell may remain empty. For the purpose of this example, complete the table as follows:
Data Type
Integer number
Real number
Integer number
(The stock column will contain the number of copies in stock)
As you enter information into the list of columns, the columns are immediately created in the table displayed in the right pane of the document main window.
When you have created the table, you can close the window for the specification of its type. Should you need to modify the table type in the future, you can do it in the Data Type section – for each item of the Data section, there is one item here containing its type. If you change the type, the corresponding item in the Data section is immediately changed too. The contents of items in the Data Type section are identical to the contents of the window displayed while you are creating a new data item in the Data section.

Insert Data into the Table

After you have defined columns of the table, you can start filling the table with data. Data is inserted into the table by means of the empty row at its bottom (the row has the · symbol on the left). This row is always present at the bottom of a table. It does not represent any data and is used only for the insertion of new rows. If you enter data into this row, it becomes a candidate row – it looks like other table rows, but on its right side, there is a button for the insertion of the row into the table and a button for the cancellation of the candidate row. Data entered into the candidate row is not inserted into the table until you press the insertion button. As a shortcut for inserting the candidate row, Shift+Enter can also be used.
A document containing the created table populated with data is stored in file Examples\Chapter 01.s-d.

Delete and Copy Table Rows

If you no longer need a particular table row, or if it was inserted by mistake, you can remove it by pressing Ctrl+Delete or the button in the tool bar.
If you need to reposition a row, grab it with the mouse by its left end, drag it to the desired position, and drop it.
You can copy, move, or remove multiple rows at a time. Select them first using the Shift+↑ and Shift+↓ keys or another combination of keys as described in the Reference Guide.
Selected rows can be copied or moved in the usual way using the clipboard (Ctrl+C, Ctrl+V, or Ctrl+X keys) or mouse drag-and-drop.

Further Information

The following chapters of the Reference Guide contain detailed information on the discussed topics:
Next: Ordering