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 2010/07/03 19:08:42 UTC
svn commit: r960237 [4/4] - in /tcl/rivet/trunk: ./ doc/html/ doc/xml/
rivet/packages/calendar/
Modified: tcl/rivet/trunk/doc/html/var.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/var.html?rev=960237&r1=960236&r2=960237&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/var.html (original)
+++ tcl/rivet/trunk/doc/html/var.html Sat Jul 3 17:08:41 2010
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>var</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="next" href="upload.html" title="upload"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">var</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commands.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="upload.html"><img src="images/next.png" alt="Next"><
/a></td></tr></table></div><div class="refentry" title="var"><a name="var"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>var, var_qs, var_post — get the value of a form variable.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-
spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_qs</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_post</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-
weight: bold;">all</span>)</div></div></div><div class="refsect1" title="Description"><a name="id338212"></a><h2>Description</h2><p style="width:90%">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>var</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="next" href="upload.html" title="upload"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">var</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commands.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="upload.html"><img src="images/next.png" alt="Next"><
/a></td></tr></table></div><div class="refentry" title="var"><a name="var"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>var, var_qs, var_post — get the value of a form variable.</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-
spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_qs</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-weight: bold;">all</span>)</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">var_post</span> (<span style="font-family:monospace; font-weight: bold;">get</span> | <span style="font-family:monospace; font-weight: bold;">list</span> | <span style="font-family:monospace; font-weight: bold;">exists</span> | <span style="font-family:monospace; font-weight: bold;">number</span> | <span style="font-family:monospace; font-
weight: bold;">all</span>)</div></div></div><div class="refsect1" title="Description"><a name="id371938"></a><h2>Description</h2><p style="width:90%">
The <span style="font-family:monospace"><span class="command"><strong>var</strong></span></span> command retrieves information
about GET or POST variables sent to the script via client
request. It treats both GET and POST variables the same,
Modified: tcl/rivet/trunk/doc/html/xml_calendar.html
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/html/xml_calendar.html?rev=960237&r1=960236&r2=960237&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/html/xml_calendar.html (original)
+++ tcl/rivet/trunk/doc/html/xml_calendar.html Sat Jul 3 17:08:41 2010
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>XmlCalendar</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="calendar_package.html" title="Calendar Package"><link rel="prev" href="calendar.html" title="Calendar"><link rel="next" href="html_calendar.html" title="HtmlCalendar"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">XmlCalendar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="calendar.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Calendar Package</th><td width="20%" align="right"> <a accesskey="n" href="html_calendar.html"><img src="images/next.png" alt="Next"></a></td></tr
></table></div><div class="refentry" title="XmlCalendar"><div class="refentry.separator"><hr></div><a name="xml_calendar"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>XmlCalendar — Prints XML formatted calendar tables</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">XmlCalendar</span> <span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>calendar_name</code></em></span> ?<span style="font-family:monospace; font-weight: bold;">-option1 <em class="replaceable"><code>option_list</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">-option2 <em class="replaceable"><code>option_list</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">...</span>?<
/div></div></div><div class="refsect1"><a name="id363200"></a><p style="width:90%">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>XmlCalendar</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="calendar_package.html" title="Calendar Package"><link rel="prev" href="calendar.html" title="Calendar"><link rel="next" href="html_calendar.html" title="HtmlCalendar"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">XmlCalendar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="calendar.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Calendar Package</th><td width="20%" align="right"> <a accesskey="n" href="html_calendar.html"><img src="images/next.png" alt="Next"></a></td></tr
></table></div><div class="refentry" title="XmlCalendar"><div class="refentry.separator"><hr></div><a name="xml_calendar"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>XmlCalendar — Prints XML formatted calendar tables</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">XmlCalendar</span> <span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>calendar_name</code></em></span> ?<span style="font-family:monospace; font-weight: bold;">-option1 <em class="replaceable"><code>option_list</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">-option2 <em class="replaceable"><code>option_list</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;">...</span>?<
/div></div></div><div class="refsect1"><a name="id396967"></a><p style="width:90%">
An XmlCalendar object is created and returned. XmlCalendar objects
print XML formatted calendar tables. The markup can be customized
using the configuration options.
@@ -10,14 +10,14 @@
The first element of an option list is a tag name, the remaining terms (if specified) are
a even-length sublist which is interpreted as attribute-value pairs that
will be copied into the opening tag of an element
- </p></div><div class="refsect1" title="Methods"><a name="id363226"></a><h2>Methods</h2><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex ">
+ </p></div><div class="refsect1" title="Methods"><a name="id396993"></a><h2>Methods</h2><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex ">
cal_obj <span style="font-weight:bold ; font-family:monospace">emit</span> -opt1 val1 -opt2 val2</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex ">
cal_obj <span style="font-weight:bold ; font-family:monospace">emit</span> ?<span style="font-family:monospace; font-weight: bold;">month</span>? ?<span style="font-family:monospace; font-weight: bold;">year</span>?-opt1 val1 -opt2 val2</div></div><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex ">
cal_obj <span style="font-weight:bold ; font-family:monospace">emit</span> ?<span style="font-family:monospace; font-weight: bold;">
<em class="replaceable"><code>month | year</code></em></span>?-opt1 val1 -opt2 val2</div></div><div style="margin-bottom:1.5ex ; padding .5ex">
The method 'emit' if invoked without arguments returns an
ASCII formatted calendar of the current month
- </div></div></dd></dl></div></div><div class="refsect1"><a name="id363318"></a><div class="refsect2" title="Options"><a name="id363320"></a><h3>Options</h3><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-container (tag_name
+ </div></div></dd></dl></div></div><div class="refsect1"><a name="id397085"></a><div class="refsect2" title="Options"><a name="id397087"></a><h3>Options</h3><div class="variablelist"><dl><dt></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">-container (tag_name
attr11 val1 attr2 val2 ...)</span> </div></div><div style="margin-bottom:1.5ex ; padding .5ex">
Assigns an options list to the XML element that
will hold the whole table.
Modified: tcl/rivet/trunk/doc/xml/calendar.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/xml/calendar.xml?rev=960237&r1=960236&r2=960237&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/xml/calendar.xml (original)
+++ tcl/rivet/trunk/doc/xml/calendar.xml Sat Jul 3 17:08:41 2010
@@ -19,6 +19,11 @@
written by Richard Suchenwirth and published on the
<ulink url="http://wiki.tcl.tk">Tcl Wiki</ulink>
</para>
+ <note>
+ The Calendar package uses Tcl <command>dict</command> command to manage markup
+ information. Hence either Tcl8.5 or Tcl8.4 with
+ <ulink url="http://wiki.tcl.tk/5042">package dict</ulink> are required.
+ </note>
</section>
<refentry id="calendar">
<refnamediv>
@@ -340,7 +345,7 @@ puts $current_month
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
- <command>XmlCalendar</command>
+ <command>HtmlCalendar</command>
<arg choice="plain"><replaceable>calendar_name</replaceable></arg>
<arg>-option1 <replaceable>option_list</replaceable></arg>
<arg>-option2 <replaceable>option_list</replaceable></arg>
@@ -358,16 +363,16 @@ puts $current_month
inherit XmlCalendar
constructor {args} {XmlCalendar::constructor $args} {
- $this configure -container table \
- -header thead \
- -body tbody \
- -banner tr \
+ $this configure -container table \
+ -header thead \
+ -body tbody \
+ -banner tr \
-banner_month {th colspan 3 style "text-align: right;"} \
-banner_year {th colspan 4 style "text-align: left;"} \
- -weekdays tr \
- -weekday_cell th \
- -days_row tr \
- -days_cell td
+ -weekdays tr \
+ -weekday_cell th \
+ -days_row tr \
+ -days_cell td
}
}</programlisting>
</refsect1>
@@ -380,4 +385,4 @@ puts $current_month
</para>
</refsect1>
</refentry>
-</section>
\ No newline at end of file
+</section>
Modified: tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl?rev=960237&r1=960236&r2=960237&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/calendar/calendar.tcl Sat Jul 3 17:08:41 2010
@@ -18,11 +18,14 @@
# $Id: calendar.tcl 916 2010-07-03 00:37:44Z massimo.manghi $
#
+
+if {[catch {package require Tcl 8.5} e] && [catch {package require dict} e]} {
+ return -code error -errorInfo "Tcl 8.5 or Tcl 8.4 with package 'dict' required ($e)"
+}
+
package provide Calendar 1.0
package require Itcl
-catch {::itcl::delete class Calendar}
-
# Calendar: base class to create a calendar table.
#
# Calendar prints an ascii calendar following the output form of a Unix
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org