1 #!/usr/bin/env tclsh8.5
3 # vim: ft=tcl foldmethod=marker foldmarker=<<<,>>> ts=4 shiftwidth=4
5 package require TLC
0.90.0
7 source "boilerplate.tcl"
9 Wizard .wizard
-showhelp 1 -startpage start
-routing {
12 {$dat(usefoo
)} get_foo
24 {$dat(usefoo
)} get_foo
31 Skip_if
{$dat(usefoo
)}
46 _layout
{row_args_sticky
-resize none
}
47 _layout
{col_args_sticky
-resize none
}
48 "Foo?" {usefoo radiogroup
-choices {
58 _validation_not_blank
{
59 "%1 must be filled in"
64 <h2
>This is the startpage of the wizard
</h2
>
66 <p
>Do you want some foo? If you don't
, you'll need to provide
75 _layout
{row_args_sticky
-resize none
}
76 _layout
{col_args_sticky
-resize none
}
79 _validation_not_blank
{
80 "%1 must be filled in"
85 Please provide the Foo.
92 _layout
{row_args_sticky
-resize none
}
93 _layout
{col_args_sticky
-resize none
}
97 _validation_not_blank
{
98 "%1 must be filled in"
103 {[info exists dat
(usefoo
)] && !$dat(usefoo
) ||
[string first
$dat(foo
) $dat(bar
)] > -1}
104 "If use choose to use foo, bar must contain it"
113 _layout
{row_args_sticky
-resize none
}
114 _layout
{col_args_sticky
-resize none
}
117 _validation_not_blank
{
118 "%1 must be filled in"
127 # _layout {row_args_sticky -resize none}
128 # _layout {col_args_sticky -resize none}
135 <tr
><td
>Foo
</td
><td
>%foo
%</td
></tr
>
136 <tr
><td
>Bar
</td
><td
>%bar
%</td
></tr
>
137 <tr class
="optional"><td
>Bar
</td
><td
>%bar
%</td
></tr
>
153 .wizard
1,1 -fill both
155 wm geometry .
"600x320"
157 .wizard waitfor finished
159 array set dat
[.wizard get_data
]
160 delete object .wizard