in reply to Using Tk::Text and '<<Modified>>'
Otherwise you will be auto-saving on every keystroke. You can also work out an auto-save scheme if the text box goes out of focus.$SIG{__DIE__} = sub {&save_it(); exit}; $SIG{INT} = sub {&save_it(); exit}; #have your exit button call &save_it too sub save_it{ # do another get('0.0','end') # take an md5sum of the text and compare # it to your original md5sum # save your text if they differ }
|
|---|