Overview

The Tcl language and Tk graphical toolkit are simple and powerful building blocks for custom applications. The Tcl/Tk combination is increasingly popular because it lets you produce sophisticated graphical interfaces with a few easy commands, develop and change scripts quickly, and conveniently tie together existing utilities or programming libraries.One of the attractive features of Tcl/Tk is the wide variety of commands, many offering a wealth of options. Most of the things you'd like to do have been ...

See more details below
Tcl/Tk in a Nutshell

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$17.99
BN.com price
(Save 43%)$31.99 List Price

Overview

The Tcl language and Tk graphical toolkit are simple and powerful building blocks for custom applications. The Tcl/Tk combination is increasingly popular because it lets you produce sophisticated graphical interfaces with a few easy commands, develop and change scripts quickly, and conveniently tie together existing utilities or programming libraries.One of the attractive features of Tcl/Tk is the wide variety of commands, many offering a wealth of options. Most of the things you'd like to do have been anticipated by the language's creator, John Ousterhout, or one of the developers of Tcl/Tk's many powerful extensions. Thus, you'll find that a command or option probably exists to provide just what you need.And that's why it's valuable to have a quick reference that briefly describes every command and option in the core Tcl/Tk distribution as well as the most popular extensions. Keep this book on your desk as you write scripts, and you'll be able to find almost instantly the particular option you need.Most chapters consist of alphabetical listings. Since Tk and mega-widget packages break down commands by widget, the chapters on these topics are organized by widget along with a section of core commands where appropriate. Contents include:

  • Core Tcl and Tk commands and Tk widgets
  • C interface (prototypes)
  • Expect
  • [incr Tcl] and [incr Tk]
  • Tix
  • TclX
  • BLT
  • Oratcl, SybTcl, and Tclodbc


This desktop quick reference reviews the popular tool command scripting language Tcl and the associated graphical toolkit Tk. This quick reference includes basic commands and popular extensions. Designed for those familiar with Tcl/Tk, this reference focuses on productivity in supporting graphics, relational databases and object-oriented programming.

Read More Show Less

Editorial Reviews

From Barnes & Noble

This desktop quick reference reviews the popular tool command scripting language Tcl and the associated graphical toolkit Tk. This quick reference includes basic commands and popular extensions. Designed for those familiar with Tcl/Tk, this reference focuses on productivity in supporting graphics, relational databases and object-oriented programming.

Highlights:

  • This comprehensive reference covers core features of Tcl/Tk along with C language application programming interfaces.
  • Covers the popular application 'Expect' along with object-oriented programming features [iner Tcl and iner Tk].
  • Reviews graphical widgets and extensions including Extended Tcl (TclX) and BLT. It also covers popular Oracle and Sybase extensions for relational database support.

Advantages:

  • This is an excellent desktop reference for an extensible scripting and graphics toolkit.
  • This alphabetized reference not only contains command, parameters and options, but also explanations, notes and warnings of undesirable side effects and consequences. Each chapter covers a specific topic or extension to Tcl/Tk.
  • The appendix lists additional online and in print resources for Tcl/Tk.

Related Titles:

A good tutorial for Tcl/Tk is Graphical Applications with Tcl & Tk, Second Edition. An excellent publication for intermediate to advanced programmers is Effective Tcl/Tk Programming. A focused programming guide is Web Development with Tcl/Tk 8.1.

Read More Show Less

Product Details

  • ISBN-13: 9780596555795
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 3/25/1999
  • Series: In a Nutshell (O'Reilly)
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 456
  • File size: 4 MB

Meet the Author

Tranter is a software developer for a large telecommunications company.

Read More Show Less

Table of Contents

Preface

Chapter 1. Introduction
What Is Tcl?
Structure of This Book

Chapter 2. Tcl Core Commands
Overview
Basic Language Features
Command-Line Options
Environment Variables
Special Variables
Backslash Substitutions
Operators and Math Functions
Regular Expressions
Pattern Globbing
Predefined I/O Channel Identifiers
Group Listing of Commands
Alphabetical Summary of Commands

Chapter 3. Tk Core Commands
Example
Command-Line Options
Environment Variable
Special Variables
Group Listing of Tk Commands
Widget Overview
Widget Commands
Utility Commands

Chapter 4. The Tcl C Interface
Constants
Data Types
Group Listing of Functions
Alphabetical Summary of Functions

Chapter 5. The Tk C Interface
Constants
Data Types
Group Listing of Functions
Alphabetical Summary of Functions

Chapter 6. Expect
Overview
Example
Command-Line Options
Environment Variables
Special Variables
Grouped Summary of Commands
Alphabetical Summary of Commands

Chapter 7. [incr Tcl]
Basic Class Definition
Special Variables
Group Listing of Commands
Example
Alphabetical Summary of Commands

Chapter 8. [incr Tk]
Basic Structure of a Mega-widget
Special Variable
Methods and Variables
Alphabetical Summary of Commands

Chapter 9. Tix
Tix Overview
Special Variables
Group Listing of Tix Commands
TixMega-widget Overview
Tix Mega-widgets
Tix Standard Widgets Overview
Tix Standard Widgets
Tix Core Commands
Tix Extensions to Tk image Command

Chapter 10. TclX
Special Variables
Group Listing of Commands
Alphabetical Summary of Commands

Chapter 11. BLT
Environment Variable
Special Variables
Group Listing of Commands
Alphabetical Summary of Commands

Chapter 12. Oratcl
Overview
Example
Environment Variables
Special Variables
Group Listing of Commands
Alphabetical Summary of Commands

Chapter 13. Sybtcl
Overview
Example
Environment Variables
Special Variables
Group Listing of Commands
Alphabetical Summary of Commands

Chapter 14. Tclodbc
Overview
Group Listing of Commands
Summary of Commands

Chapter 15. Hints and Tips for the Tcl Programmer
Think Commands, Not Statements
Comments Are Treated as Commands
A Symbolic Gesture
Lists Are Strings, but Not All Strings Are Lists
Indirect References
Executing Other Programs
When Is a Number Not a Number?
Quoting and More Quoting
Write Once, Run Where?
Common Tk Errors
Use the Source, Luke!

Appendix A. Tcl Resources

Index

Read More Show Less

First Chapter


Chapter 1: Introduction

This chapter presents a brief history of and an introduction to the Tcl language and describes how this book is organized.

What Is Tcl?

In the early 1980s John Ousterhout, then at the University of California at Berkeley, was working with a group that developed hardware design tools. They found that they kept inventing a new scripting language with each new tool they developed. It was always added as an afterthought and poorly implemented. John decided to create a general-purpose scripting language that could be reused when developing new tools. He called the language Tcl, for tool command language, made it freely available for download, and presented it at the Winter 1990 USENIX conference. It soon became popular, with an estimated 50 Tcl applications written or in development one year later.

One of the attendees at Ousterhout's presentation, Don Libes, saw the applicability of Tcl to a problem he was working on. Within a few weeks he developed the first version of Expect, which became the first killer application for Tcl, driving many people to install Tcl who might have otherwise ignored it.

Ousterhout's philosophy is to embed a scripting language inside applications. Combining the advantages of a compiled language like C (portability, speed, access to operating system functions) with those of a scripting language (ease of learning, runtime evaluation, no compilation) gives an overall reduction in development time and opportunities for creating small, reliable, and reusable software components. An application with an embedded Tcl interpreter can be extended and customized by the end user in countless ways.

The Tcl interpreter has a well-defined interface and is typically built as an object library, making it easy to extend the basic language with new commands. Tcl can also be used as a prototyping language. An application can be written entirely in Tcl, and once the design is proven, critical portions can be rewritten in C for performance reasons.

A year later, at the Winter USENIX conference, Ousterhout presented Tk, a graphical toolkit for Tcl that made it easy to write applications for the X11 windowing system. it also supported the send command, a simple yet powerful way to allow Tk applications to communicate with each other.

Since then, with dozens of Tcl extensions, many of them designed to solve problems related to specific domains such as graphics and relational databases, the Tcl programming environment has become even more powerful. Today, Tcl runs on Unix, Macintosh, and Windows platforms, and even inside a web browser. It has a huge installed base of users and applications, both free and commercial. As Tcl approaches its tenth anniversary, it is poised to continue its growth in popularity.

Structure of This Book

Following this brief introduction, Chapter 2 covers the core features of the Tcl language itself. Chapter 3 covers Tk, the graphical user interface (GUI) toolkit that is probably the most popular Tcl extension. Chapter 4 covers the C-language application programming interface for Tcl, and Chapter 5 does the same for Tk.

Each language extension chapter follows a similar format: after a brief introduction, any special global and environment variables are described, followed by a logically grouped summary of the commands. The heart of each chapter is an alphabetical summary of each command that lists the options in detail. Short programming examples are provided for the more complex commands.

Chapter 6 covers Expect, the first popular application to be built using Tcl. Chapter 7 is on [incr Tcl], which adds object-oriented programming features to Tcl. Chapter 8 covers [incr Tk], a framework for object-oriented graphical widgets built using [incr Tcl].

Chapter 9 covers Tix, a Tk extension that adds powerful graphical widgets. Chapter 10 is on TclX, also known as Extended Tel, a number of extensions that make Tcl more suited to general-purpose programming. Chapter 11 is on BLT, which provides a number of useful new commands for producing graphs, managing data, and performing other graphics-related functions.

Tcl has good support for relational databases. Chapter 12 and Chapter 13 cover the Tcl extensions for the popular Oracle and Sybase relational databases, and Chapter 14 describes Tclodbc, which supports the Microsoft Windows ODBC database protocol.

Chapter 15, Hints and Tips for the Tcl Programmer, by Tom Poindexter, departs from the style of the rest of the book somewhat by presenting a collection of tips for using Tcl effectively, commonly made errors, and suggestions on programming style.

The Appendix, Tcl Resources, lists further resources on Tcl, both in print and on the Internet. The index cross-references the material in the book, including every Tcl command described in the text.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted June 17, 2004

    Good for a reference, not so good for beginners

    If you need some hand-holding and are just getting started with TCL then this book is not for you. Tcl/TK in a nutshell is exactly what the title says, a desktop quick reference. Don't expect many examples or explanations. Compared to Perl / C style languages TCL is a little weird to look at and takes some getting used to. And it's easy to get tripped up if you aren't already experienced with the language. A lot of the material in the book doesn't go any deeper than the TCL man pages. So beginners, get a different book / tutorial to learn the language. If you are proficient in TCL than this book would make a great reference, but as a beginner (to TCL, not to programming) a lot of times I had to supplement what the book gave by searching the web for examples to making things clearer. But it is definitely useful for looking up rarely used / obscure commands that you may have forgotten. Even though the book lacks a lot of examples and hand holding it is very comprehensive and covers a lot of material.

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)