Menu icon Add Snippet Dialog Box
Menu icon Edit Snippet Dialog Box

This dialog box is displayed when either the Database | Add Snippet or Database | Edit Snippet menu options are selected. It is used to enter details of a new user defined code snippet or to edit the details of an existing user-defined snippet.

If a new snippet is being added all controls are blank or set to default values. When an existing snippet is being edited the controls are populated with the snippet's existing properties.

Editing the snippet

The dialog has multiple tabs. All but the Code tab are optional – others can be used to provide additional information about the snippet. However, if you plan to test compile the snippet you must ensure that the snippet's dependencies and units are properly set up on the References tab.

Code Tab

This tab gathers all the information to uniquely define a snippet. All the fields are required. They are:

References Tab

Use this tab to specify the snippets and units that are associated with the snippet being edited. If it is intended to test compile the snippet then the Dependencies and Units list boxes must be completed if the snippet depends on a Delphi unit or if it uses another snippet from the database.

Extra Information Tab

This tab is used to provide additional descriptive information about the snippet. Information can be specified using a simple markup language called REML.

Compile Results Tab

Use this tab to specify any known compiler results for the snippet. You can specify the required compiler in several ways:

Commiting the edit

Clicking OK causes the edited snippet to be validated. If an error is found the control where the error is located is selected and an error message is displayed. If the snippet is valid the dialog box closes and the user database is updated.

Click Cancel to abort the edit.