The history of programming and the Delphi environment
Lessons 35–36 · 2 lessons · N. I. Taylaqov (general editor), A. B. Akhmedov, M. D. Pardayeva, A. A. Abdug‘aniyev, U. M. Mirsanov. Informatics and Information Technologies, Grade 10, 1st edition. “Extremum-Press”, Tashkent, 2017
36
The Delphi programming environment
Textbook: pp. 83–86
GoalNames the main parts of the Delphi environment (menu, toolbar, component palette, Object Inspector, form and code window), creates a new application and saves the project in its own folder.
New words
Object Inspector: the window that shows the properties and events of the selected object · Object Inspectorform: the window of the application being created · formacomponent: a ready control that is placed on a form · komponentaproject: all the files that make up one application · loyiha
Explanation
At the top of the Delphi window are the title bar, the main menu (File, Edit, Search, View, Project, Run, Component, Database, Tools, Window, Help – 11 sections in all) and the toolbar; the component palette is divided into tabs (Standard, Additional, Win32 and others). The form (Form1) is the window of the application being created: components are dragged onto it with the mouse, and its size is also changed by dragging. The Object Inspector gives the list of properties (Properties) and events (Events) of the selected object, and the Object TreeView shows the objects of the application as a tree. The Code Editor changes together with the form, and the programmer writes the procedure that answers an event there. To create an application: File – New – Application. Delphi creates several files for each project, so save each project in a new folder of its own (File – Save All); before starting a new project from an existing one, copy the old folder, otherwise the previous work will be changed.
Worked examples
Delphi 7 was started and File – New – Application was pressed: Form1 and Unit1 appeared. When Save All is pressed, a name is asked first for the unit (Unit1.pas) and then for the project (Project1.dpr); both are saved in the folder 01_salom.
Two students each save their own project in the shared “Projects” folder but in separate inner folders (01_a and 01_b). If both wrote Unit1.pas in one folder, the second would overwrite the first. A separate folder prevents such a clash.
Class activity
“The environment map”: a pair draws a screenshot of Delphi (or Lazarus), names 8 parts and writes the job of each in one word, then saves a new application in a separate folder.
Practice
1
How many sections does the Delphi main menu have?
11
2
Which menu path creates a new application?
File – New – Application
3
Which command saves all the files of a project with one command?
Save All
4
Why is each project saved in a separate folder?
So that files with equal names (Unit1.pas) do not overwrite each other and spoil the work.