Hi TW-Community,
I don’t find out how to call a procedure from a procedure and to give over the parameter.
Situation is:
Three global procedures show_table
and edit_table
and show_edit_table
.
In the procedure show_edit_table I try to call show_table
and edit_table
with the same parameter but it failed. I thought to use << >>
but this is definitely wrong.
code-body: yes
tags: $:/tags/Global
title: proc/show_edit_table
\whitespace trim
\procedure show_edit_table(fields)
<<show_table <<fields>> >>
<<edit_table <<fields>> >>
\end
code-body: yes
tags: $:/tags/Global
title: proc/edit_table
\whitespace trim
\procedure edit_table(fields)
<$let
currTidd=<<currentTiddler>>
>
Here we are:<br>
<table>
<$list filter="[enlist<fields>]" variable="field">
<tr>
<th><$edit-text tiddler=<<currTidd>> field=<<field>>/>
</th>
</tr>
</$list>
</table>
</$let>
\end
code-body: yes
tags: $:/tags/Global
title: proc/show_table
\whitespace trim
\procedure show_table(fields)
<$let
currTidd=<<currentTiddler>>
>
Here we are:<br>
<table>
<$list filter="[enlist<fields>]" variable="field">
<tr>
<th><$view tiddler=<<currTidd>> field=<<field>>/>
</th>
</tr>
</$list>
</table>
</$let>
\end
AAA: Content of AAA
BBB: Content of BBB
CCC: Content of CCC
tags:
title: Debug_Tiddler
! Show table
<<show_table "AAA BBB CCC">>
! Edit table
<<edit_table "AAA BBB CCC">>
! Show and Edit table
<<show_edit_table "AAA BBB CCC">>
And this is the output.
show_table
edt_table
show_edt_table
Stefan