File: node48.html

package info (click to toggle)
dotfile-doc 2.0-1.2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 624 kB
  • ctags: 686
  • sloc: makefile: 35; tcl: 22; sh: 13
file content (74 lines) | stat: -rw-r--r-- 3,227 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--Converted with LaTeX2HTML 96.1 (Feb 5, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>Example of the ShowPage function</TITLE>
<META NAME="description" CONTENT="Example of the ShowPage function">
<META NAME="keywords" CONTENT="dotdotfiles">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="dotdotfiles.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" LANG="EN">
 <a href="index.html"><img align=right border=0 src=Graphics/gray-g3.gif></a><A NAME="tex2html712" HREF="node49.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="Graphics/next_motif.gif"></A> <A NAME="tex2html710" HREF="node43.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="Graphics/up_motif.gif"></A> <A NAME="tex2html704" HREF="node47.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="Graphics/previous_motif.gif"></A> <A NAME="tex2html714" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="Graphics/contents_motif.gif"></A>  <BR>
<B> Next:</B> <A NAME="tex2html713" HREF="node49.html">When will the functions be invoked</A>
<B>Up:</B> <A NAME="tex2html711" HREF="node43.html">The InitChange, ShowPage and
PageEnd </A>
<B> Previous:</B> <A NAME="tex2html705" HREF="node47.html">Interpage dependencies</A>
<BR> <HR> <P>
<H2><A NAME="SECTION00065000000000000000">Example of the <tt>ShowPage</tt> function</A></H2>
<P>
<A NAME="ShowPage">&#160;</A>
To illustrate interpage dependencies, here comes an example.  In this
example a program exists, which has two different versions, that only
differs a bit. The module programmer has decided that he will configure
both versions with the same module. On a page called <tt>Version</tt>
the user can select which version he uses with a radio button. This may
look like this:
<P>
<PRE>proc version {} {
  # version
  Radio ver -text &quot;version of the program&quot; -entries {6 6.01}
}</PRE>
<P>
No <tt>ShowPage</tt>, <tt>Change</tt>, <tt>Init</tt>,
<tt>PageEnd</tt> or <tt>Save</tt> functions is necceary on this
page, as it doesn't generate any code, and the radio element is always
enabled.
<P>
On a different page an element exist, say a <tt>CheckBox</tt> with label
<tt>Use feature 42</tt>. This option is only avilable in version 6.01 of
the program, and should therefore be disabled, when version 6 is
selected. No code should be generated for this option if version 6 is
selected.
<P>
This page may look like this:
<PRE>proc page {} {
  # page
  CheckBox feature -text &quot;feature 42&quot;
  
  ShowPage {
    if {[set version@ver(name)] == &quot;6.01&quot;} {
      Disable feature
    } else {
      Enable feature
    }
  }

  Save {
    if {[set version@ver(name)] != &quot;6.01&quot;} {
      print &quot;use feature42: $feature&quot;
    }
  }
}</PRE>
<P>
As you can see, no <tt>Change</tt> function exists, since there is no
intrapage dependencies.
<P>
<BR> <HR>
<P><ADDRESS>
<a href="http://www.imada.ou.dk/~blackie/">Jesper Kj&aelig;r Pedersen</a> &lt;<a href="mailto:blackie@imada.ou.dk">blackie@imada.ou.dk</a>&gt;<BR>
Wed Oct  2 13:29:53 MET DST 1996
</ADDRESS>
</BODY>
</HTML>