next up previous contents
Next: Part 2 Up: Exercise Previous: Exercise

Part 1

The very first part of this exercise will teach you how to create the basic skeleton for a module. To do this you have to create the the file called main.template

For this first part, you have to set the following variables:

module(creator)
This is your name
module(version)
This is the version number for your module. You may for instance give it version 1.0a1
module(name)
This is the name of your module. Call it ``Test''. NOTE: You may not create a module with a name of an already existing module!
setup(dotfile)
This is a list of information about which files to generate. In this demo we would like to generate three files, with the default locations: ``file1.test'', ``~/file2.test'' and ``file3.test''. file1.test should be the default location to generate to. Find suitable texts and comment chars for the three files.

Well nothing has been configured yet, so please import the file called test-mod.template

This should be enough for the file main.template, so please edit the file called test-mod.template (which is imported from main.template)

See Syntax of dotdot files for a description of how the page is organized, or refer to one of the pages in an existing module. gif

In this file you have to create a single checkbox, with the text ``Press me''. Find a suitable help message for the checkbox.

This checkbox should be located on a page called ``Testpage''.

In this first part, no Save, PageEnd, Change or Init function is needed.

The page should have the initial description:

tex2html_wrap1091

To see if everything works fine, you have to edit your ~/.wishrc file, so it looks like this:

  if {[file exists main.template]} {
    set argv {"/usr/local/lib/dotfile/Generator" "./"}
    set argc 2
    set setup(preventBytecompile) 1
    source /usr/local/lib/dotfile/Generator/dotfile.tcl
  }

You may have to change /usr/local/lib/dotfile/ to the path of the Dotfile Generator on your system. gif This make wish start the Dotfile Generator, when it find the file called main.template in the current working directory.

Now you should type wish in the directory, where your modules is located. This will start the Dotfile Generator.


next up previous contents
Next: Part 2 Up: Exercise Previous: Exercise

Jesper Kjær Pedersen <blackie@imada.ou.dk>
Wed Oct 2 13:29:53 MET DST 1996