Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing text widget contents to file

Status
Not open for further replies.

magicme

Technical User
Jun 11, 2003
22
US
hello
i am new to tcl/tk and am converting some VB programs as i learn tcl.
am trying to write (puts? dump?) the contents of a multiline text widget to a file.
i was using the puts command to write stuff line by line simultaneously to the text widget and the output file, but this makes a lot of duplicate code.

i tried simply:
puts $outfilename .textwidgetname.text

but that didn't work

i have two bokks here and neither one explains how to write the complete contents of a text widget to a file.

any help would be appreciated.

daveleo
 
thanks

it worked like a charm.

daveleo

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top