For providing of the subsequent connection of the tables of databases with the components of the program before formation of structure of database Alias (pseudonym for way in to the files of database) is created. For this purpose in the Database Desktop environment the option Alias Manager is chosen from the menu. In the window that is opened New is taken, in the field of Database alias the title is put in, by the Browse button the manager of files is caused and the necessary folder is found. After pressure of the button Ok the way to the selected folder is taken out to the Path field. Then it's necessary to click on the Save As button and keep data in the file of the configuration IDAPI32.CFG.
For creating the structure of the table of database a command with the File/New/Table menu is selected, the type of the Paradox 7 table is set and the name of the first field is put, its type is set by the choice from the list after pressure the carriage space key, the field size is put if necessary. In order the sorting of information was carried out on this field it is necessary to press any alphabet-numeral key in the key column. Next fields are put by analogy. For every field it is possible to set additional limitations, for example, maximal and minimum meanings of these fields, etc. In the end the Save As command is chosen, the way by Alias is set, the file name is put and preserved. It is possible to enter or edit data directly in the Database Desktop environment if necessary, but mostly Database Desktop is used only for creating the structure of table.
Tables of database of the NeoLog program
The basic file of database of the NeoLog program is called Words.db and has the following structure:
Field Name Type Size Key
1 Word A 50 *
2 Source A 20
3 Target A 20
4 Uses A 20
5 Note M 240
6 Eh M 240
A - string to 250 symbols, M - texts that consist of many lines, * - in the Key column means that on the Word field, sorting of information is carried out.
Records of other files of database: Source.db, Target.db, Uses.db consist of one field. These tables are auxiliary and serve as fixed data source for the proper fields of the table Words.db.
Combinig of databases with the components of the program
For adjusting of connection between the tables of databases and components of the project special components Table and DataSource are used. For Table the DatabaseName property even Alias is set. It was created and specifies the way to the files of database, and also the TableName property, even to the name of file of database. For the DataSource component the DataSet property even to the name the Table components which she associate with is set. Studying the information of databases is carried out with the help of the components, which are in the inset of the palette of instruments with the Data Controls name. Necessary component is set on a form and is contacted with a database by the DataSource and DataField properties. In order the component used data from the database, the active component "Table" propertly must have the meaning "True".
At the use of a several tables of database Table and DataSource pair must correspond to each table with the proper adjusting, therefore in our program there are four of them.
Visible and invisible components
The components of the VCL library have various allocations. One of them are intended for the reflection of information, the others provide only combining with other objects. The first ones are called visible components, the others - invisible. For example, Button component is a visible one, Table and DataSource components are invisible. The NeoLog Program also uses the other invisible components: MainMenu, SaveDialog, OpenDialog. With the help of the MainMenu component multilevel menus can be created. For example, the menu of the Neolog program has the following structure:
Dictionary Search Parameters DSL Info...
All Exit To create
Computer Formed To open
Economy Industries ----------------
Media To store
Creation of procedures of studying the event
Forproviding of functionality of the program procedures of studying the events are created. For example, in the NeoLog program, the first menu Dictionary item is intended for the setting of information, its editing and revision.
Its call provides the correct reflection of all components, that give necessary information, and also the components, that manage the processes.
The text of the proper procedure looks like this way:
procedure TForm1.N1Click(Sender: TObject);
StatusBar1.Panels.Items.Text:='All in all: ' +IntToStr(Table1.RecordCount);
In this procedure the meaning of the property Visible objects are set, and functions of determination of the amount of records are also used in the table of database and current number of record.
For the creation of template of procedure it is enough to click in the menu Dictionary in the Delphi environment and the following code will appear:
procedure TForm1.N1Click(Sender: TObject);
Between begin and end; it is necessary to write down needed commands which answer the Object Pscal programming language, which is a host language for Delphi.
Organization of multiwindows projects
Using the property of the Visible objects it is possible to create the dynamic picture of software environment on one form. But Delphi allows to create applications, the work of which is organized in different windows. Such projects contain several forms. Thus there is the method of the use of equal windows and unequal ones, that is one of the windows is main and the others are daughter's. Different multiwindow methods are used in the NeoLog program. For example, for organization of the work of the menu: Dictionary, Search, DSL one form is used, and a dynamics is achieved by manipulation of the Visible property. Other options of the menu form windows in other forms. Thus, as the menu Parameters, has the critical value for studying data, the work in the main window is blocked up to the completion of the work with the inferior window.
Installation of the program
For correct work of the application in the Windows environment, the exact concordance between the components of the addition and operating system is necessary especially at the use of databases. Therefore the simple copying of programmatic