puts "Inserting <$script> into $tscript"
$tscript delete 1.0 end
puts "A: <[$tscript get 1.0 end]>"
$tscript insert 1.0 $script
puts "B: <[$tscript get 1.0 end]>"
$tscript see 1.0
$tscript yview moveto 0.0
The first "puts" indicates that the text to be inserted is what I
think it is. The second and third "puts" calls show that the contents
of the text widget is unchanged after the "insert" and "delete" calls.
As I say, this happens only sometimes. It's easily repeatable; but
I've been unable to find any obvious reason why the behavior differs
in the different cases. More to the point, I can't see why the
"delete" and "insert" should ever be ignored.
Anybody have any ideas?
Never mind; nothing to see here, move along. These aren't the badgers
you're looking for.
I'd guess the widget was (sometimes) disabled? ;^)
Jeff
*Blush*
Yes, that was it. The text widget contains a script; as the app was
originally designed, the text widget was disabled while the script was
executing. Later, I changed it so that the script's execution
terminates if the user interacts with the text widget in any way,
e.g., by clicking on it. That removed the need for disabling the text
widget. And all of this is more or less ancient history; I'd almost
forgotten about it.