home *** CD-ROM | disk | FTP | other *** search
- Introduction to Tcl, tclsh and shade
-
- THIS SYSTEM REQUIRES RISCOS 3.1 OR LATER
-
- IT IS SUPPLIED WITHOUT ANY FORM OF WARRANTY OR RESPONSIBILITY FOR ITS USE.
- See below for conditions.
-
- Tcl (pronounced tickle ) is a simple interpreted scripting language.
- It is extensible in that it is easy to add commmands to Tcl, and embeddable
- in that it can be included in other applications.
-
- Tcl was invented and implemented by John K.Ousterhout, originally for unix
- systems. It is usually used with an extension to the x windowing system called
- Tk, either embedded in applications, or using a general purpose Tcl/Tk program
- called wish. Tcl can also be used from the command line using another program
- called tclsh. Unix Tcl is split into a generic part and a POSIX extension,
- containing the unix-specific operations such as file handling.
-
- This distribution contains analogs of the above components for RISCOS machines.
- It contains a Tcl interpreter for generic Tcl with RISCOS extensions that can
- be run from from the command line using a program tclsh.
- It contains an extension of Tcl for writing simple wimp programs called w. This
- is run from a program called shade.
-
- The RISCOS extensions provide equivalent functions to most of the POSIX
- extensions that are appropriate for RISCOS.
-
- Note that w does not attempt to be compatible with, or as comprehensive as Tk.
- It provides an iconbar icon, menus, simple dialog boxes, scrolling windows for
- text display, and windows for draw type graphics. It can run command line tasks
- using the taskwindow system.
-
- The tclsh interpreter can be run in a taskwindow by double clicking on the
- !Tcl icon. You will need to have a program running to provide taskwindow
- display such as zap or edit.
-
- ================================================================================
- Documentation
-
- The Tcl Language is documented in the book "Tcl and the Tk Toolkit"
- by J.K.Ousterhout (Addison Wesley 1994) ISBN 0-201-63337-X.
-
- Online documentation in the form of unix man pages are provided. These are
- included in this distribution with an example shade program that displays them.
-
- Tcl has a very regular and simple but unfamiliar syntax. If you have not used
- Tcl before you should attempt to master this before writing Tcl code, otherwise
- you will find it a very frustrating experience. You can read chapter 3 of the
- book or the syntax file in the online documentation. You can experiment with
- Tcl by running tclsh in a task window.
-
- The !Tcl.doc directory contains the following
-
- README README file from the Tcl 7.4 distribution.
- changes changes file from the Tcl 7.4 distribution.
- RISCOS Documentation on the RISCOS extensions to Tcl. These are
- replacements for some of the POSIX function that are not included.
- tclsh Documentation on calling the command line interface to tcl.
- shade Documentation on calling Tcl with the w desktop extensions.
- Manual.TeX LaTeX manual for the w extensions.
-
- Several shade example programs are included. They each have a !Help file.
- The !wtest program does nothing useful, but includes commented examples
- of most of the w commands.
-
- ================================================================================
- Copyright
-
- The Tcl source is Copyright (c) The Regents of the University of California.
- See the file !Tcl.licence for conditions.
-
- The RISCOS and w extensions are copyright C.T.Stretch they may be used or
- distributed in any manner compatible with the Tcl copyright, provided
- that all copyright statements including this file remain intact.
-
- ALL MATERIAL IN THIS DISTRIBUTION IS PROVIDED WITH NO WARRANTY WHATSOEVER
- USE IT AT YOUR OWN RISK
-
- ================================================================================Changes from the previous release
-
- There is now an officially allocated file type for Tcl scripts, 0x12e.
-
- There are no changes to Tcl itself.
- The only change to the RiscOS extensions are the addition of the date command.
-
- The w extensions have a number of bug fixes, and the addition of new commands
- w_send, w_null and w_info. In addition there are some changes that may
- require alteration to code that ran under w version 1.1:
-
- 1) The separation of %d and %w percent substitution has been made more logical.
- Dialog box scripts always set %d, menus and windows set %w.
-
- 2) The interpretation of results returned by scripts has been made more
- consistent. Returning an empty string is now always equivalent to returning
- zero. This changes the behavior of action icons in dialog boxes. They now need
- to return 1 if the dialog box is to be kept open. This is now easier to
- achieve as the return command can now be used to return from any script.
-
- 3) A wimpslot of 160K is now required to unsqueeze the shade executable.
- This may require changing the !Run files.
-
- ================================================================================
- The source code
-
- This distribution is based on Tcl version 7.4
-
- The makefile is for use with Acorn's !Make.
- The binaries included were made with Acorn C v 5.06 and OSLib v 5.1
-
- To use the makefile the include path C: has to include the ANSI and OSLib
- headers. The tboxlibs headers are not needed, if they are in your include path
- ensure they are AFTER OSLib, otherwise you will get the wrong h.wimp!
-
- Source files from the 7.4 distribution that are not used in the RISCOS version
- are included in subdirectory !Tcl.unused.
-
- The Tcl test files that come with Tcl 7.4 are included. They are run from the
- obey file !RunTests in the !Tcl.Tests directory. Some of the unix test files,
- do not work as they use unix specific features. These are contained in
- !Tcl.test.fail, a few minor modifications were made to other test files to
- avoid unix specific features. These are commented on as the tests are run.
-
-
- ================================================================================
- Common Questions
-
- Q1) Why have I not ported Tk?
-
- A) Tk is very closely tied to X-windows. X-windows has major differences from
- the RiscOS wimp. Porting Tk would be very hard work, and probably beyond me.
- A Tk port would be tied to the X/Mosaic look and feel, which would not
- fit at all well with the RicsOS Style Guide.
- If you want to try porting Tk I wish you the best of luck.
-
- Q2) Shade programs crash when I click on dbox buttons, particularly the
- Quit button in the Debug dialog box.
-
- A) This does not happen to me! I think it is due to a RiscOS bug using 3-D
- icons, it tries to pop the button up after the dialog box has gone.
- This does not occur with more recent versions of RiscOS. The cure is to
- run the BorderUtils module that comes with !NewLook.
-
- Q3) Why is Tcl so slow?
-
- A) It is a completely interpreted language, with no attempt to precompile
- anything. As it works only with strings it is very slow at any arithmetic,
- where it converts strings to numbers, and then converts back to strings.
- It is fast enough for many user-inteface purposes.
-
- ================================================================================
- Contact
-
- I would be pleased to hear bug reports or general comments about this
- distribution. I can be contacted at
-
- ct.stretch@ulst.ac.uk
-
- or C.T.Stretch,
- Depatment of Mathematics,
- University of Ulster,
- Coleraine Co. Londonderry,
- BT52 1SA
- NORTHERN IRELAND
-
- New versions will be provided by electronic media only (probably HENSA).
-
-
-
-