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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
<!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>The main dotdotfile - main.template</TITLE>
<META NAME="description" CONTENT="The main dotdotfile - main.template">
<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="tex2html824" HREF="node59.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="Graphics/next_motif.gif"></A> <A NAME="tex2html822" HREF="node57.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="Graphics/up_motif.gif"></A> <A NAME="tex2html816" HREF="node57.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="Graphics/previous_motif.gif"></A> <A NAME="tex2html826" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="Graphics/contents_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html825" HREF="node59.html">import</A>
<B>Up:</B> <A NAME="tex2html823" HREF="node57.html">Initialization of dotdotfiles</A>
<B> Previous:</B> <A NAME="tex2html817" HREF="node57.html">Initialization of dotdotfiles</A>
<BR> <HR> <P>
<H2><A NAME="SECTION00091000000000000000">The main dotdotfile - <EM>main.template</EM></A></H2>
<P>
<A NAME="maintemplate"> </A>
The main dotdotfile is the one which initialize the Dotfile Generator,
and sources tcl script written by the module programmer. You have the following
optional associative arrays, which you can set in this file:
<P>
<H3><A NAME="SECTION00091100000000000000">setup</A></H3>
<P>
<A NAME="setup"> </A>
An associative array called <TT>setup</TT> with the following keys:
<DL ><DT><STRONG>print</STRONG>
<DD> Boolean flag indicating whether to print on generate.
<DT><STRONG>file</STRONG>
<DD> Boolean flag indicating whether to save to file on generate.
<DT><STRONG>whatToGenerate</STRONG>
<DD> This variable can have three different values:
<DL ><DT><STRONG>one</STRONG>
<DD> This tells the Dotfile Generator to generate only the
actual page (the one on the screen)
<DT><STRONG>selected</STRONG>
<DD> This tells the Dotfile Generator to generate those
pages which have been marked for generation
<DT><STRONG>all</STRONG>
<DD> This tells the Dotfile Generator to generate all pages.
<P>
</DL>
<DT><STRONG>generateDefault</STRONG>
<DD> Boolean flag indicating whether default shall be
generated or not.
<DT><STRONG>saveOnGenerate</STRONG>
<DD> Boolean flag indicating whether save shall be
done on generate.
<DT><STRONG>placeWindows</STRONG>
<DD> Boolean flag indicating whether the Dotfile
Generator should place windows or it is the window manager's job.
<DT><STRONG>preventBytecompile</STRONG>
<DD> This boolean flag is used to prevent
byte compilation when you are developing your module, and
it would be meaningless (<B>Remember</B> to remove it from the
dotdotfile when you release your module)
<DT><STRONG>dotfile</STRONG>
<DD> This is a list of list, where the index's elements have
the following meanings:
<OL><LI> A token to be used in <EM>print</EM><LI> A text to be show in the setup menu<LI> The name of the file to connect with this token<LI> Comment character for this file.
</OL>
An example:
<PRE> set setup(dotfile) {
{access "Configuration file for access control" access.conf \#}
{httpd "General configuration file" httpd.conf \#}
{mime "Mime types" mime.types \#}
}</PRE>
<P>
</DL>
<P>
<H3><A NAME="SECTION00091200000000000000">module</A></H3>
<P>
And in the associative array <EM>module</EM>
<DL ><DT><STRONG>creator</STRONG>
<DD> This is your name.
<DT><STRONG>version</STRONG>
<DD> This is the version of your module.
<DT><STRONG>name</STRONG>
<DD> This is the name of the program, which your module
configures.
<DT><STRONG>overAllDesc</STRONG>
<DD> This is the description, which will be placed at
the top of the output file. The Dotfile Generator will inseret the
comment char of the language on every start of a line. (Lines are
seperated with <code>\</code>n)
<DT><STRONG>parser</STRONG>
<DD> This is the name of a tcl script to read the original
dotfile (see <A HREF="node61.html#original">Importing the original
dotfile</A>)
<DT><STRONG>email</STRONG>
<DD> This is your email address. If this is not set, bug
repports and suggestion can <em>NOT</em> be sent to you from The Dotfile Generator .
<P>
</DL>
<P>
The file main.temlate is always read, while all the other template files
only are read, when the module is <b>NOT</b> bytecompiled. That is the
reason why you have to source additional tcl scripts from
<tt>main.template</tt>.
<P>
In <tt>main.template</tt> you may refer to a variable called
<tt>loadedByteCompileFile</tt>, which contain the value 1 if the module
has been bytecompile.
<P>
This is very usefull, when used with the <A HREF="node3.html#how_it_works">SaveVars
function</A>, which the following
example will show:
<PRE>if {!$loadedByteCompileFile} {
global colorList
set colorList [showRgb2list]
SaveVars colorList
}</PRE>
In this example, the function <tt>showRgb2list</tt> reads the colors from the
system, and sort them. This takes several minutes, so it is best if this
is only done the first time the module is read. This value will then be
saved into the bytecompiled file.
<P>
<HR><A NAME="tex2html824" HREF="node59.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="Graphics/next_motif.gif"></A> <A NAME="tex2html822" HREF="node57.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="Graphics/up_motif.gif"></A> <A NAME="tex2html816" HREF="node57.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="Graphics/previous_motif.gif"></A> <A NAME="tex2html826" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="Graphics/contents_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html825" HREF="node59.html">import</A>
<B>Up:</B> <A NAME="tex2html823" HREF="node57.html">Initialization of dotdotfiles</A>
<B> Previous:</B> <A NAME="tex2html817" HREF="node57.html">Initialization of dotdotfiles</A>
<P><ADDRESS>
<a href="http://www.imada.ou.dk/~blackie/">Jesper Kjær Pedersen</a> <<a href="mailto:blackie@imada.ou.dk">blackie@imada.ou.dk</a>><BR>
Wed Oct 2 13:29:53 MET DST 1996
</ADDRESS>
</BODY>
</HTML>
|