Delphi 2007 Handbook








August 2, 2006

Info on Delphi Live Templates

The Delphi Wiki site has a couple of interesting articles on Live Templates, certainly worth reading if you use Delphi 2006 and want to customize how the editor works.

One of the most interesting features of the Delphi 2006 editor is the introduction of Live Templates. Some of the predefined Live Templates allow you to change the way you write the code, like the Variable Injection templates that allows you to define a variable anywhere in your source code... letting the template move it to the proper var block. (I was showing it this morning, and the Delphi programmers seeing it for the first time liked it a lot).

A nice thing about Live Templates is that they are fully customizable. A not so nice think is that they are not documented. The Delphi Wiki site fills this gap woith two interesting articles, one with lots of examples and the other with some reference material. Now what I'd really like DevCo to document, beside some of the other details, is the list of scripts (or internal functions) you can invoke from the templates, like:

  • InvokeClassCompletion
  • PopulateCase
  • DeclareVariable
  • RemoveTemplate
  • ValidateForTemplate

It would also be nice to know a little more about adding your own scripts to templates, like Adam does in the demo references by this blog entry. Again, the more I look into this feature the more I like it and the more I feel it should be documented better... and I know there is very little in my "update-to-Delphi-2006" ebook, so it is my fault as well!





 

1 Comments

Info on Delphi Live Templates 

Hi,

it is interesting to see that all of a sudden the 
Delphi Wiki is becoming popular after beeing a kind 
of sleeping beauty for quite a while.

I'd like to think that this is because of good 
quality articles like those you linked to (I wrote 
the one about the technical infos, took me the 
better part of a day to find all that stuff), but 
they have been there for quite a while.

So I wonder what made people realise the wiki exists?

twm
Comment by Thomas Mueller [http://www.dummzeuch.de] on August 2, 19:51


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.