Duration
5 days
Objective
Learn Tcl/Tk8.4's powerful improvements in functionality, flexibility, and performance cover common facet of Tcl/Tk programming, including cross-platform scripting and GUI development.
Chapter 1. Tcl Fundamentals
- Tcl Commands
- Hello, World!
- Variables
- Command Substitution
- Math Expressions
- Backslash Substitution
- Grouping with Braces and Double Quotes
- Procedures
- A Factorial Example
- More about Variables
- More about Math Expressions
- Comments
- Substitution and Grouping Summary
- Fine Points
- Reference
Chapter 2. Getting Started
- The source Command
- UNIX Tcl Scripts
- Windows Start Menu
- Macintosh OS 8/9 and ResEdit
- The console Command
- Command-Line Arguments
- Predefined Variables
Chapter 3. The Guestbook CGI Application
- A Quick Introduction to HTML
- CGI for Dynamic Pages
- The guestbook.cgi Script
- Defining Forms and Processing Form Data
- Handling Errors in CGI Scripts
- Next Steps
Chapter 4. String Processing in Tcl
- The string Command
- The append Command
- The format Command
- The scan Command
- The binary Command
- Related Chapters
Chapter 5. Tcl Lists
- Tcl Lists
- Constructing Lists
- Getting List Elements: llength, lindex, and lrange
- Modifying Lists: linsert and lreplace
- Searching Lists: lsearch
- Sorting Lists: lsort
- The split Command
- The join Command
- Related Chapters
Chapter 6. Control Structure Commands
- If Then Else
- Switch
- While
- Foreach
- For
- Break and Continue
- Catch
- Error
- Return
Chapter 7. Procedures and Scope
- The proc Command
- Changing Command Names with rename
- Scope
- The global Command
- Call by Name Using upvar
- Variable Aliases with upvar
Chapter 8. Tcl Arrays
- Array Syntax
- The array Command
- Building Data Structures with Arrays
Chapter 9. Working with Files and Programs
- Running Programs with exec
- The file Command
- Cross-Platform File Naming
- Manipulating Files and Directories
- File Attributes
- Input/Output Command Summary
- Opening Files for I/O
- Reading and Writing
- The Current Directory — cd and pwd
- Matching File Names with glob
- The exit and pid Commands
- Environment Variables
- The registry Command
Chapter 10. Quoting Issues and Eval
- Constructing Code with the list Command
- Exploiting the concat inside eval
- The uplevel Command
- The subst Command
Chapter 11. Regular Expressions
- When to Use Regular Expressions
- Regular Expression Syntax
- Advanced Regular Expressions
- Syntax Summary
- The regexp Command
- The regsub Command
- Transforming Data to Program with regsub
- Other Commands That Use Regular Expressions
Chapter 12. Script Libraries and Packages
- Locating Packages: The auto_path Variable
- Using Packages
- Summary of Package Loading
- The package Command
- Libraries Based on the tclIndex File
- The unknown Command
- Interactive Conveniences
- Tcl Shell Library Environment
- Coding Style
Chapter 13. Reflection and Debugging
- The clock Command
- The info Command
- Cross-Platform Support
- Tracing Variables and Commands
- Interactive Command History
- Debugging
- Tcl Dev Kit
- Other Tools
- Performance Tuning
Chapter 14. Namespaces
- Using Namespaces
- Namespace Variables
- Command Lookup
- Nested Namespaces
- Importing and Exporting Procedures
- Callbacks and Namespaces
- Introspection
- The namespace Command
- Converting Existing Packages to use Namespaces
- [incr Tcl] Object System
- xotcl Object System
- Notes
Chapter 15. Tk Fundamentals
- Hello, World! in Tk
- Naming Tk Widgets
- Configuring Tk Widgets
- Tk Widget Attributes and the Resource Database
- Summary of the Tk Commands
- Other Widget Sets
Chapter 16. Tk by Example
- ExecLog
- The Example Browser
- A Tcl Shell
Chapter 17. The Pack Geometry Manager
- Packing toward a Side
- Horizontal and Vertical Stacking
- The Cavity Model
- Packing Space and Display Space
- Resizing and -expand
- Anchoring
- Packing Order
- Choosing the Parent for Packing
- Unpacking a Widget
- Packer Summary
- Window Stacking Order
Chapter 18. The Grid Geometry Manager
- A Basic Grid
- Spanning Rows and Columns
- Row and Column Constraints
- The grid Command
Chapter 19. The Place Geometry Manager
- Place Basics
- The Pane Manager
- The place Command
Chapter 20. The Panedwindow Widget
- Using the Panedwindow
- Programming Panedwindow Widgets
- Panedwindow Attributes
- Binding Commands to Events
- The bind Command
- The bindtags Command
- Event Syntax
- Modifiers
- Event Sequences
- Virtual Events
- Generating Events
- Event Summary
Chapter 21. Buttons and Menus
- Button Commands and Scope Issues
- Buttons Associated with Tcl Variables
- Button Attributes
- Button Operations
- Menus and Menubuttons
- Menu Bindings and Events
- Manipulating Menus and Menu Entries
- Menu Attributes
- A Menu by Name Package
Chapter 22. The Resource Database
- An Introduction to Resources
- Loading Option Database Files
- Adding Individual Database Entries
- Accessing the Database
- User-Defined Buttons
- User-Defined Menus
Chapter 23. Simple Tk Widgets
- Frames, Labelframes, and Toplevel Windows
- The Label Widget
- The Message Widget
- The Scale Widget
- The bell Command
Programme scope, delivery arrangements and suitability are confirmed during enquiry.