Practical Programming in Tcl and Tk
Home > Computing and Information Technology > Operating systems > Practical Programming in Tcl and Tk
Practical Programming in Tcl and Tk

Practical Programming in Tcl and Tk

|
     0     
5
4
3
2
1




International Edition


About the Book

Practical Programming in Tcl/Tk is described as the "bible" for Tcl programmers. It is a guide to the Tcl/Tk programming language and GUI toolkit. This revision includes substantial updates to cover the new version 8.4-giving both an overview of the features, as well as details about every command in the language. The third edition, written on version 8.2, sold over 30,000 copies. Version 8.4 of Tcl - Tool Command Language-provides substantial updates to one of the most popular UNIX scripting languages. The latest release, includes the addition of a virtual filesystem (VFS), many additional programming widgets (spinbox, panedwindow, labelframe),and improved performance of about 20% over 8.3. The book provides a guide to the best ways to use the tooklit. It not only gives accurate details, but includes extensive examples that demonstrate the best way to use the toolkit. The authors are experts that have both developed the technology and used it to solve problems, so they have many valuable insights to relate to the readers.

Table of Contents:
List of Examples. List of Tables. Preface. I. Tcl BASICS. 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. 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. 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. 4. String Processing in Tcl. The string Command. The append Command. The format Command. The scan Command. The binary Command. Related Chapters. 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. 6. Control Structure Commands. If Then Else. Switch. While. Foreach. For. Break and Continue. Catch. Error. Return. 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. 8. Tcl Arrays. Array Syntax. The array Command. Building Data Structures with Arrays. 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. II. ADVANCED Tcl. 10. Quoting Issues and Eval. Constructing Code with the list Command. Exploiting the concat inside eval. The uplevel Command. The subst Command. 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. 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. 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. 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. 15. Internationalization. Character Sets and Encodings. Message Catalogs. 16. Event-Driven Programming. The Tcl Event Loop. The after Command. The fileevent Command. The vwait Command. The fconfigure Command. 17. Socket Programming. Networking Extensions for Tcl. Client Sockets. Server Sockets. The Echo Service. Fetching a URL with HTTP. The http Package. Basic Authentication. 18. TclHttpd Web Server. Integrating TclHttpd with Your Application. Domain Handlers. Application Direct URLs. Document Types. HTML + Tcl Templates. Form Handlers. Programming Reference. Standard Application Direct URLs. The TclHttpd Distribution. Server Configuration. 19. Multiple Interpreters and Safe-Tcl. The interp Command. Creating Interpreters. Safe Interpreters. Command Aliases. Hidden Commands. Substitutions. I/O from Safe Interpreters. The Safe Base. Security Policies. 20. Safe-Tk and the Browser Plugin. Tk in Child Interpreters. The Browser Plugin. Security Policies and Browser Plugin. Configuring Security Policies. 21. Multi-Threaded Tcl Scripts. What are Threads? Thread Support in Tcl. Getting Started with the Thread Extension. Sending Messages to Threads. Preserving and Releasing Threads. Error Handling. Shared Resources. Managing I/O Channels. Shared Variables. Mutexes and Condition Variables. Thread Pools. The Thread Package Commands. 22. Tclkit and Starkits. Getting Started with Tclkit. Virtual File Systems. Using sdx to Bundle Applications. Exploring the Virtual File System in a Starkit. Creating tclhttpd.kit. Creating a Shared Starkit. Metakit. More Ideas. III. Tk BASICS. 23. 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. 24. Tk by Example. ExecLog. The Example Browser. A Tcl Shell. 25. 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. 26. The Grid Geometry Manager. A Basic Grid. Spanning Rows and Columns. Row and Column Constraints. The grid Command. 27. The Place Geometry Manager. place Basics. The Pane Manager. The place Command. 28. The Panedwindow Widget. Using the Panedwindow. Programming Panedwindow Widgets. Panedwindow Attributes. 29. Binding Commands to Events. The bind Command. The bindtags Command. Event Syntax. Modifiers. Event Sequences. Virtual Events. Generating Events. Event Summary. IV. Tk Widgets. 30. 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. 31. The Resource Database. An Introduction to Resources. Loading Option Database Files. Adding Individual Database Entries. Accessing the Database. User-Defined Buttons. User-Defined Menus. 32. Simple Tk Widgets. Frames, Labelframes, and Toplevel Windows. The Label Widget. The Message Widget. The Scale Widget. The bell Command. 33. Scrollbars. Using Scrollbars. The Scrollbar Protocol. The Scrollbar Widget. 34. The Entry and Spinbox Widgets. Using Entry Widgets. Using Spinbox Widgets. Entry and Spinbox Bindings. Entry and Spinbox Attributes. Programming Entry and Spinbox Widgets. 35. The Listbox Widget. Using Listboxes. The Listbox Widget. Listbox Bindings and Events. Listbox Attributes. 36. The Text Widget. Text Indices. Text Marks. Text Tags. The Selection.Tag Bindings. Searching Text. Embedded Widgets. Embedded Images. Looking inside the Text Widget. The Undo Mechanism. Text Bindings and Events. Text Operations. Text Attributes. 37. The Canvas Widget. Canvas Coordinates. Hello, World! The Min Max Scale Example. Canvas Objects. Canvas Widget and Canvas Object State Options. Canvas Operations. Generating Postscript. Canvas Attributes. Hints. V. Tk DETAILS. 38. Selections and the Clipboard. The Selection Model. The selection Command. The clipboard Command. Selection Handlers. 39. Focus, Grabs, and Dialogs. Standard Dialogs. Custom Dialogs. Animation with the update Command. 40. Tk Widget Attributes. Configuring Attributes. Size. Borders and Relief. The Focus Highlight. Padding and Anchors. 41. Color, Images, and Cursors. Colors. Colormaps and Visuals. Bitmaps and Images. The Text Insert Cursor. The Mouse Cursor. 42. Fonts and Text Attributes. Naming a Font. X Font Names. Font Metrics. The font Command. Text Attributes. Gridding, Resizing, and Geometry. A Font Selection Application. 43. Send. The send Command. The Sender Script. Communicating Processes. Remote eval through Sockets. 44. Window Managers and Window Information. The wm Command. The winfo Command. The tk Command. 45. Managing User Preferences. App-Defaults Files. Defining Preferences. The Preferences User Interface. Managing the Preferences File. Tracing Changes to Preference Variables. Improving the Package. 46. A User Interface to Bindings. A Pair of Listboxes Working Together. The Editing Interface. Saving and Loading Bindings. VI. C Programming. 47. C Programming and Tcl. Basic Concepts. Creating a Loadable Package. A C Command Procedure. The blob Command Example. CONST in the Tcl 8.4 APIs. Strings and Internationalization. Tcl_Main and Tcl_AppInit. The Event Loop. Invoking Scripts from C. 48. Compiling Tcl and Extensions. Standard Directory Structure. Building Tcl from Source. Using Stub Libraries. Using autoconf. The Sample Extension. 49. Writing a Tk Widget in C. Initializing the Extension. The Widget Data Structure. The Widget Class Command. The Widget Instance Command Configuring and Reconfiguring Attributes. Specifying Widget Attributes. Displaying the Clock. The Window Event Procedure. Final Cleanup. 50. C Library Overview. An Overview of the Tcl C Library. An Overview of the Tk C Library. VII. CHANGES. 51. Tcl 7.4/Tk 4.0. wish. Obsolete Features. The cget Operation. Input Focus Highlight. Bindings. Scrollbar Interface. pack info. Focus. The send Command. Internal Button Padding. Radiobutton Value. Entry Widget. Menus. Listboxes. No geometry Attribute. Text Widget. Color Attributes. Color Allocation and tk colormodel. Canvas scrollincrement. The Selection. The bell Command. 52. Tcl 7.5/Tk 4.1 Cross-Platform Scripts. The clock Command. The load Command. The package Command. Multiple foreach loop variables. Event Loop Moves from Tk to Tcl. Network Sockets. Multiple Interpreters and Safe-Tcl. The grid Geometry Manager. The Text Widget. The Entry Widget. 53. Tcl 7.6/Tk 4.2. More file Operations. Virtual Events. Standard Dialogs. New grid Geometry Manager. Macintosh unsupported1 Command. 54. Tcl/Tk 8.0. The Tcl Compiler. Namespaces. Safe-Tcl. New lsort. tcl_precision Variable. Year 2000 Convention. Http Package. Serial Line I/O. Platform-Independent Fonts. The tk scaling Command. Application Embedding. Native Menus and Menubars. CDE Border Width. Native Buttons and Scrollbars. Images in Text Widgets. No Errors from destroy. grid rowconfigure. The Patch Releases. 55. Tcl/Tk 8.1. Unicode and Internationalization. Thread Safety. Advanced Regular Expressions. New String Commands. The DDE Extension. Miscellaneous. 56. Tcl/Tk 8.2. The Trf Patch. Faster String Operations. Empty Array Names. Browser Plugin Compatibility. Finer Control of Windows Serial Port Monitoring. Regular Expression Expanded Syntax Option. 57. Tcl/Tk 8.3. New File Manipulation Commands and Options. New glob Options. Regular Expression Command Enhancements. Direct Return of scan Matches. Removing Duplicate List Elements with lsort. Deleting Elements from an Array. Enhanced clock Features. Support for Delayed Package Loading in pkg_mkIndex. The Img Patch. The Dash Patch. Other New Tk Features. The Patch Releases. 58. Tcl/Tk 8.4. 64-Bit Support. Additional Filesystem Features and Commands. New and Enhanced List Commands. Array Searching and Statistics. Enhanced Support for Serial Communications. New String Comparison Operators. Command Tracing. Additional Introspection Commands. Other Tcl Changes. New Tk Widgets. Text Widget Undo Mechanism and Other Enhancements. New pack and grid Features. Displaying Both Text and an Image in a Widget. New Button Relief Attributes. Controlling the State of Entries and Listboxes. More Window Manager Interaction. Other Tk Changes. 59. About The CD-ROM. Technical Support.


Best Sellers


Product Details
  • ISBN-13: 9780130385604
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Pearson
  • Height: 230 mm
  • No of Pages: 960
  • Spine Width: 450 mm
  • Width: 180 mm
  • ISBN-10: 0130385603
  • Publisher Date: 26 Jun 2003
  • Binding: Paperback
  • Language: English
  • Returnable: Y
  • Weight: 1414 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Practical Programming in Tcl and Tk
Pearson Education (US) -
Practical Programming in Tcl and Tk
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Practical Programming in Tcl and Tk

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!