home *** CD-ROM | disk | FTP | other *** search
/ Practical Programming in Tcl & Tk (4th Edition) / TCLBOOK4.BIN / mac / exsource.old / 34_8.tcl < prev    next >
Text File  |  2003-04-15  |  284b  |  18 lines

  1. #
  2. # Example 34-8
  3. # Dumping the text widget with a command callback.
  4. #
  5.  
  6. proc Text_Dump {t {start 1.0} {end end}} {
  7.     $t dump -command TextDump $start $end
  8. }
  9. proc TextDump {key value index} {
  10.     if {$key == "text"} {
  11.         puts "$index \"$value\""
  12.     } else {
  13.         puts "$index $key $value"
  14.     }
  15. }
  16.  
  17.  
  18.