Delphi7 from getting started to four

zhaozj2021-02-16  61

Delphi editor

On the surface, the seventh version of the IDE seems to have no change in the editor of Delphi. However, after the scene, it is a new tool. In addition to the files that use it to handle Object Pascal language (or Delphi language, Borland now like this to call it) file, you can now use it to handle other uses for Delphi development (such as SQL, XML, HTML, and XSL files) Files, there are files for other languages ​​(including C and C #). XML and HTML editing have been available in Delphi 6, but there is a major change in this version. For example, when editing an HTML file, you have a support for the syntax to complete support with the code.

The editor settings on each file (including keys such as label Tab) depends on the extension of the opened file. You can configure these settings in the new Source Options page page of the new editor properties dialog Editor Properties Dialog Box, as shown in Chart 1.4. This feature has been expanded and more open, so you can provide a highlighted language that provides syntactics for other programming languages ​​by providing a DTD based on XML-based file format or writing a custom wizard. Another feature of the editor, code template, now is the language characteristic (your predefined Delphi template will not feel in HTML or C #.). ? ? ?

chart

1.4

:

A variety of languages ​​supported by the Delphi IDE can be associated with a variety of extensions in the Source Options Page page of Editor Properties Dialog Box.

Note C # is a new language introduced in Microsoft in its .NET architecture. Borland is looking forward to supporting C # in its own .NET environment, the current encoded name is Galileo.

Just considering the Delphi language, the editor included in the IDE has not changed many in the nearest version. However, there are many characteristics that the Delphi programmer does not understand and not used, so I think this is worth a brief exam for it.

The Delphi Editor allows you to handle several files simultaneously, use a "Notebook with Tabs" metaphor. You can jump from a page of the editor to the adjacent page, by pressing the Ctrl Tab shortcut combination (or pressing the Ctrl SHIFT TAB shortcut combination to the opposite direction). You can drag and drop the (Drag-and-DROP) editor tag with unit names on the editor to change their sorting, so you can use a single CTRL Tab in any given time to move between units. The editor's shortcut menu also has a pages command, which is listed in all available pages in a submenu (this is a very convenient feature when many units are loaded).

You can also open multiple editor windows, each window has multiple tags. This is the only way to see the source code of the two units that are licking each other. ((In fact, when I need to compare two Delphi units, I always use Beyond Compare-www.scootersoftware.com-a utility that is best to write with Delphi.)

Several options affect the editor, such as what you see in the editor properties dialog (Editor Properties Dialog Box) in Chart 1.4. However, you have to turn to the preferences page for Environment Options Dialog Box (see Chart 1.2) to page Setting Editor's AutoSave feature. This option forces the editor to save all source program files while you run the program to prevent the program from being lost when the program crashes in the debugger (such a few cases occur). Delphi's editor provides a number of commands, including some of its WordStaremulation Anncestry (early Turbo Pascal compiler). I will not discuss the settings of various editors because they are very intuitive and described in online help. Note: Only when you look for a shortcuts index project, the help of the keyboard shortcut key is easy to understand as a whole.

A trick to remember is that the use of CUT and PASTE commands is not the only way to move source code. You can also choose and drag the vocabulary, expressions, or the entire code line. In addition, you can press the CTRL button to copy text when dragging, not moving it.

Code browser

The code explorer window, which is generally reduced on the edge of the edited, lists all types, variables, and daily transactions in a unit definition, plus other units in the use of declarations in use. For complex number of types, such as categories, code explorers can list detailed information, including a list of domains, property, and methods. Once you start typing in editing, all information is updated.

You can use the code explorer to drive in the editor. If you double click on one of the inputs in the code explore, edit the corresponding announcement. You can also modify variables, property, and method names in the code explorer. However, if you are working on your category, you want to use a visual tool, you will see, and ModelMaker provides many more features.

Although all this function is obvious after you have used Delphi, all of the features of the code explorer are not so intuitive. You have a sufficient control of the information layout. At the same time, you can reduce the depth of the tree that is usually displayed in this window by custom code explore (making the tree crash can help you make your choice to make your choice). You can select the code explore by using the environment of the corresponding page, as a collar number 1.5.

转载请注明原文地址:https://www.9cbs.com/read-22674.html

New Post(0)