Add Snippet Dialogue Box
Edit Snippet Dialogue Box

This dialogue box is displayed when either the Snippets | New Snippet or Snippets | 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 dialogue 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 needed to 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.

The available controls are:

Extra Information Tab

This tab is used to provide additional descriptive information about the snippet. Use it for information that supplements the snippet's description or for crediting authors etc.

Enter the required information in the Extra information markup editor. You can enter either plain text of formatted text and hyperlinks using the custom REML markup language.

The information can be previewed using the Preview button. Clicking this button also validates markup if you have used it.

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 dialogue box closes and the user database is updated.

Click Cancel to abort the edit.