RTD Training & Development

Programming with Tcl/Tk

Call us on +44 (0)1225 66 72 72 or send us a message

Programming with Tcl/Tk

4 days hands-on £1,940+VAT

This course can be delivered over the web

Next scheduled date:
Monday July 2nd, 2018 Enrol Now!

Tcl essentials and Tk GUI development

Outline

The Tcl Environment

  • Tcl commands
  • Running Tcl on Windows
  • Running Tcl on Unix and Linux
  • The windowing shell (Wish)

Tcl Basics

  • Variables
  • Command substitution
  • Grouping
  • Conditionals
  • Looping
  • Procedures
  • Scope

Tcl Data

  • String processing
  • List processing
  • Arrays
  • Building complex data structures

Regular Expressions

  • Simple regular expressions
  • Metacharacters
  • Character classes
  • Back-references
  • Capturing sub-patterns
  • Non-greedy qualifiers

Multi-processing and I/O

  • Executing external programs
  • Manipulating files and directories
  • Reading and writing data
  • Inter-process communication

Libraries and Packages

  • Locating packages
  • Autoloading
  • Using namespaces

Network Programming

  • Client sockets
  • Server sockets
  • The HTTP package

Tk Basics

  • Creating and naming widgets
  • Configuring widgets
  • Using geometry managers
  • The 'pack' geometry manager
  • The 'grid' geometry manager
  • The 'place' geometry manager

Event Handling

  • Binding commands to events
  • Key events
  • Mouse events
  • Virtual events

Tk Widgets

  • Frames and windows
  • Buttons and menus
  • Text widgets
  • Scrollbars
  • List boxes
  • The canvas widget

Graphics and Text

  • Bitmaps
  • Colours
  • Cursors
  • Fonts

The Windowing Environment

  • Window management
  • Dialog boxes
  • Focus management
  • Using the clipboard

Extending Tcl/Tk

  • Interfacing to other languages
  • Writing command procedures
  • Writing Tk widgets

Overview

Tcl is a scripting language that with a simple syntax and cross-platform support. It is known for rapid development and extensibility. As such it is a popular choice for automated hardware and software testing. Tcl provides easy access to networking facilities and is also commonly used to generate dynamic web pages. With its Tk toolkit, Tcl provides facilities for creating GUIs that are very simple yet remarkably powerful.

This course provides a hands-on introduction to both Tcl and Tk. The workshops are based on real-world examples of Tcl and Tk applications.

Objectives

On successful completion of this course, participants will be able to:

  • Write, debug and execute Tcl scripts
  • UnderstandTcl's powerful regular expressions
  • Use Tcl to manipulate files and directories
  • Write networked and web-enabled applications in Tcl
  • Create graphical interfaces with Tk
  • Interface Tcl/Tk with other languages

Audience

This course is for programmers, testers, web developers and system administrators who wish to use Tcl/Tk in their environment.

Prerequisites

Participants are expected to be familiar with at least one other programming language.