<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 10/01/2012 14:41, Mattias Gaertner wrote:
<blockquote
cite="mid:1586873246.459646.1326206474088.JavaMail.open-xchange@comcenter.netcologne.de"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<p style="margin: 0pt;"> <span> <span></span> </span> </p>
<div style="margin: 5px 0px;"> <br>
Mattias Gaertner <a class="moz-txt-link-rfc2396E" href="mailto:nc-gaertnma@netcologne.de"><nc-gaertnma@netcologne.de></a> hat am 10.
Januar 2012 um 15:33 geschrieben: <br>
<br>
<blockquote style="margin-left: 0px; padding-left: 10px;
border-left: 1px solid blue;">
<p style="margin: 0pt;"> </p>
<p style="margin: 0px;"> </p>
<div style="margin: 5px 0px;"> <br>
Martin <a class="moz-txt-link-rfc2396E" href="mailto:lazarus@mfriebe.de"><lazarus@mfriebe.de></a> hat am 10. Januar 2012 um
15:04 geschrieben: <br>
<br>
> On 10/01/2012 13:29, Antonio Fortuny wrote: <br>
> > Hi folks. <br>
> > <br>
> > Does anyone know where I can find a syntax
description and the usage <br>
> > rules of all keywords which appear in the source
code templates ? <br>
> > And those which do not appear as well ;-) <br>
> > Basically I did find the file
"..\lazarus\ide\lazarus_dci_file.dci" <br>
> > and it already gives some self explanatory rules.
<br>
> > My purpose is to enriche as much as possible with
code snippets that I <br>
> > use very often <br>
> <br>
> Have you tried "Insert Macro" In the code-template
editor window <br>
> ("Tools" Menu) ? <br>
> <br>
> It lists them all + description </div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">The documentation is here:</p>
<p style="margin: 0px;"><a class="moz-txt-link-freetext" href="http://wiki.lazarus.freepascal.org/IDE_Window:_Code_Templates">http://wiki.lazarus.freepascal.org/IDE_Window:_Code_Templates</a></p>
</blockquote>
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Martin, can you elaborate how the "param"
macro works? The description is looks a bit confusing:</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> Inserts an editable Cell, with a default
value <br>
"",Sync=n (,S=n), to Sync with a previous cell (n=1 to highest
prev cell <br>
"default",Sync, to Sync with a previous cell of equal default </p>
<p style="margin: 0px;"> <br>
</p>
</blockquote>
<br>
<br>
updated:<br>
<br>
'Inserts an editable Cell. Cells can be navigated using the tab
key.%0:s' +<br>
'The "param" macro takes a list of comma separated
arguments.%0:s' +<br>
'The first argument is the default value.%0:s' +<br>
'The 2nd argument (optional) can be used to link the cell to
another cell (syncro edit)%0:s' +<br>
'%0:s' +<br>
' while param("foo") do param(foo);%0:s' +<br>
'Inserts 2 independent cells, both with the default text
"foo"%0:s' +<br>
'The quotes are optional%0:s' +<br>
'%0:s' +<br>
' if param("foo") > 0 and param("foo",sync=1) < 99
then%0:s' +<br>
'Inserts 2 linked cells, editing either one, will change the
other one too%0:s' +<br>
'The value "1" refers to the position of the other "param()",
so if there are more params:%0:s' +<br>
' if param("bar") and param(foo) > 0 and param(foo,sync=2)
< 99 then%0:s' +<br>
'The 2nd and third are linked. (the 3rd refers to "2") %0:s' +<br>
'%0:s' +<br>
'"sync can be shortened to "s":%0:s' +<br>
' if param("foo") > 0 and param("foo",s=1) < 99
then%0:s' +<br>
'%0:s' +<br>
' if param("bar") and param("foo") > 0 and
param("foo",sync) < 99 then%0:s' +<br>
'The 2nd and third are linked.%0:s' +<br>
'Note: "Sync has no position and no "=", so it syncs to the
previous cell with the same default (in this case "foo")' ;<br>
<br>
<br>
</body>
</html>