You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2012/06/27 12:23:37 UTC
svn commit: r1354407 - in /tcl/rivet/trunk: ChangeLog configure.ac
contrib/form.tcl doc/xml/commands.xml rivet/packages/form/form.tcl
Author: mxmanghi
Date: Wed Jun 27 10:23:34 2012
New Revision: 1354407
URL: http://svn.apache.org/viewvc?rev=1354407&view=rev
Log:
* configure.ac: Version number set as 1.2.0b1
* rivet/packages/form/form.tcl: form package 1.0 taken from branches/2.0
* doc/xml/commands.xml: improved page manual about incr0 being declared deprecated
* contrib/form.tcl: Requiring package TclOO making explicit it's needed to run this version of form.tcl
Modified:
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/configure.ac
tcl/rivet/trunk/contrib/form.tcl
tcl/rivet/trunk/doc/xml/commands.xml
tcl/rivet/trunk/rivet/packages/form/form.tcl
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1354407&r1=1354406&r2=1354407&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Wed Jun 27 10:23:34 2012
@@ -1,3 +1,11 @@
+2012-06-27 Massimo Manghi <mx...@apache.org>
+ * configure.ac: Version number set as 1.2.0b1
+ * rivet/packages/form/form.tcl: form package 1.0 taken from branches/2.0
+ * doc/xml/commands.xml: improved page manual about incr0 being declared deprecated
+
+2012-06-20 Massimo Manghi <mx...@apache.org>
+ * contrib/form.tcl: Requiring package TclOO making explicit it's needed to run this version of form.tcl
+
2012-06-01 Massimo Manghi <mx...@apache.org>
* rivet/packages/form/form2.tcl: New form2.tcl providing form 2.0 package (proposed name for
the file)
Modified: tcl/rivet/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/configure.ac?rev=1354407&r1=1354406&r2=1354407&view=diff
==============================================================================
--- tcl/rivet/trunk/configure.ac (original)
+++ tcl/rivet/trunk/configure.ac Wed Jun 27 10:23:34 2012
@@ -22,7 +22,7 @@ dnl
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------
-AC_INIT([Rivet],[2.1.0a1])
+AC_INIT([Rivet],[2.1.0b1])
TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
Modified: tcl/rivet/trunk/contrib/form.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/contrib/form.tcl?rev=1354407&r1=1354406&r2=1354407&view=diff
==============================================================================
--- tcl/rivet/trunk/contrib/form.tcl (original)
+++ tcl/rivet/trunk/contrib/form.tcl Wed Jun 27 10:23:34 2012
@@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+package require TclOO
package provide form 1.0
Modified: tcl/rivet/trunk/doc/xml/commands.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/commands.xml?rev=1354407&r1=1354406&r2=1354407&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/commands.xml (original)
+++ tcl/rivet/trunk/doc/xml/commands.xml Wed Jun 27 10:23:34 2012
@@ -789,32 +789,33 @@ keyvalue_map(args) = 1 2 3 4 5</programl
<refentry id="incr0">
<refnamediv>
- <refname>incr0</refname>
- <refpurpose>increment a variable or set it to 1 if nonexistent.</refpurpose>
+ <refname>incr0</refname>
+ <refpurpose>increment a variable or set it to 1 if nonexistent.</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <cmdsynopsis>
- <command>incr0</command>
- <arg><replaceable>varname</replaceable></arg>
- <arg><replaceable>num</replaceable></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>Description</title>
- <para>
- Increment a variable
- <option><replaceable>varname</replaceable></option> by
- <option><replaceable>num</replaceable></option>. If the
- variable doesn't exist, create it instead of returning an
- error.
- </para>
-
- <note>
- incr0 functionality is now provided by <command>incr</command>,
- therefore this command is obsolete and it's kept
- only for compatibility. It will be removed in future versions of Rivet
- </note>
+ <cmdsynopsis>
+ <command>incr0</command>
+ <arg><replaceable>varname</replaceable></arg>
+ <arg><replaceable>num</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
+ <para>
+ Increment a variable
+ <option><replaceable>varname</replaceable></option> by
+ <option><replaceable>num</replaceable></option>. If the
+ variable doesn't exist, create it instead of returning an
+ error.
+ </para>
+
+ <note>
+ incr0 functionality is provided by the native <command>incr</command> in
+ Tcl >= 8.5, therefore this command is deprecated and kept as an
+ interpreter alias only for compatibility and as such it wasn't moved to
+ the ::rivet namespace. It will be removed in future versions of Rivet.
+ </note>
</refsect1>
</refentry>
@@ -1062,6 +1063,17 @@ bxxb ccxxxxcc</programlisting>
is assigned more than once the corresponding array element will be a
list of the values for the variable. This can be useful in the case
of forms with checkbox options that are given the same name.
+ This condition is signalled by the presence of an auxiliary array
+ variable.
+ </para>
+ <para>
+ Example: if a group of checkboxes are associated to the <option>var1</option>
+ variable then <command>response(var1)</command> will store
+ the list of their values and the array will also have the extra variable
+ <option>response(__var1)</option> which can be tested with
+ the usual <command>[info exists response(<option>__var1</option>)]</command>
+ </para>
+ <para>
Calling <command>load_response</command> several times for the same
array results in adding more values to the array at every call.
When needed it is left to the caller to empty the array between
Modified: tcl/rivet/trunk/rivet/packages/form/form.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/form/form.tcl?rev=1354407&r1=1354406&r2=1354407&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/form/form.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/form/form.tcl Wed Jun 27 10:23:34 2012
@@ -200,9 +200,12 @@ package provide form 1.0
# if there's a label then prepare to output it.
if {[info exists data(label)]} {
- # if there's no id defined, generate something unique so we can reference it.
+
+ # if there's no id defined, generate something
+ # unique so we can reference it.
+
if {![info exists data(id)]} {
- set data(id) "autogen_[::uuid::uuid generate]"
+ set data(id) "autogen[incr field_cnt]"
}
set label "<label for=\"$data(id)\">$data(label)</label>"
}
@@ -488,6 +491,7 @@ package provide form 1.0
array set DefaultValues [array get array]
}
+ private variable field_cnt 0
private variable DefaultValues
private variable DefaultArgs
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org