CodeSnip v4 is a substantial update over previous versions. Here is a list of key new features of this version. All new features were introduced in v4.0 unless otherwise noted.
Snippets from both the main and user databases can now be duplicated
using the Snippets | Duplicate Snippet menu option, by
pressing Shift+Ctrl+D or by clicking
the
tool
button.
This is very useful if you have created a snippet and want to create another one that shares a lot of the source code, dependencies etc. Just duplicate the first one with a new name and edit it as required. It saves a lot of time.
There's a second use where you can duplicate a snippet from the main database under the same name and make any tweaks you like to the new version: duplicate snippets are always editable.
$WARN directive. This is controlled on the
Code Generation page of the
Preferences dialogue box.
Snippets can now have an optional "display name" that, unlike the snippet's name, does not need to be unique. This is useful for giving meaningful names to snippets such as overloaded functions.
For example snippets ResizeRect_A and ResizeRect_B in the online database now have display names ResizeRect (TSize overload) and ResizeRect (Longint overload) which are much more meaningful.
Information about how a snippet from the online Code Snippets Database was tested is now displayed by means of a glyph at the top right of the detail pane, as follows:
the snippet has been given some basic testing before
uploading to the database.
the snippet has been more rigorously tested, for
example by unit testing.
the snippet has not been tested and should be used with
care.
toolbar button to make the displayed snippet a favourite.
You can specify the paths to be searched by Delphi compilers when looking for used units. This lets you compile snippets that use units other than those provided in the VCL and RTL. For example you can specify a path to the Indy components to compile them.
Use the Configure Compilers dialogue box to set the paths on a per-compiler basis.
For other features of v4 please read the change log for this release and all preceding v4 releases, including alpha (preview) and beta releases and release candidates.