From 1cc37646f1712e16381662e802d74172fb6f86f9 Mon Sep 17 00:00:00 2001 From: Cyan Ogilvie Date: Sat, 21 Jun 2008 12:54:04 +0200 Subject: [PATCH] Allowed -form_schema_prefix to tlc::Pagedform --- examples/pagedform.tcl | 12 +++--------- scripts/pagedform.itk | 4 +++- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/examples/pagedform.tcl b/examples/pagedform.tcl index eab7b92..f9da7b8 100755 --- a/examples/pagedform.tcl +++ b/examples/pagedform.tcl @@ -23,6 +23,9 @@ tlc::Pagedform .p -mode list -input_transform { set dat(fake2) $dat(foo) } -output_transform { array unset dat fake2 +} -form_schema_prefix { + _layout {row_args_sticky -resize none} + _layout {col_args_sticky -resize none} } -pages { "Page 1" { #<<< type html @@ -42,9 +45,6 @@ tlc::Pagedform .p -mode list -input_transform { } options {-padding 2} schema { - _layout {row_args_sticky -resize none} - _layout {col_args_sticky -resize none} - "Foo" {foo} "Bar" {bar} } @@ -53,9 +53,6 @@ tlc::Pagedform .p -mode list -input_transform { "Page 3" { #<<< options {-padding 2} schema { - _layout {row_args_sticky -resize none} - _layout {col_args_sticky -resize none} - "Baz" {baz} "Quux" {bar label} @@ -69,9 +66,6 @@ tlc::Pagedform .p -mode list -input_transform { "This is a very long page title" { #<<< options {-winding h} schema { - _layout {row_args_sticky -resize none} - _layout {col_args_sticky -resize none} - "A" {a entry -width 4} "B" {b entry -width 4} "C" {c entry -width 4} diff --git a/scripts/pagedform.itk b/scripts/pagedform.itk index e02603b..0f3f271 100644 --- a/scripts/pagedform.itk +++ b/scripts/pagedform.itk @@ -16,6 +16,7 @@ class tlc::Pagedform { variable pages {} variable input_transform {} variable output_transform {} + variable form_schema_prefix {} method set_data {args} method get_data {args} @@ -394,7 +395,8 @@ body tlc::Pagedform::build_page {name path settings} { #<<< error "Invalid page setting(s): \"[join $invalid_settings {", "}]\"" } - tlc::Form $path -schema [dict get $settings schema] \ + tlc::Form $path -schema \ + [concat $form_schema_prefix [dict get $settings schema]] \ {*}[dict get $settings options] log debug "Built form ($path) for page \"$name\", options ([dict get $settings options])" $path attach_signal $signals(enabled) -- 2.11.4.GIT