Tkinter's Text widget has a method edit_modified() which should return True if the modified flag of the widget has been set, False otherwise. It should also be possible to pass True or False into the method to set the flag to a desired state. The implementation retrieves the correct value, but then calls self._getints( result ). This causes an exception to be thrown. In my build, I found that changing the implementation to the following appears to fix the function. return self.tk.call( self._w, 'edit', 'modified', arg )
This bug still exists, I'm attaching a patch against current python-trunk. This patch is based on the fact that documentation tk 8.4 (version which edit command was added) and tk 8.5 says only edit_modified is supposed to return something, which is either 0 or 1, so there was no reason to use _gettints on that tk.call, and returning an empty tuple is against the expected value, 0.
Hi Guilherme, funny, I wasn't aware of this duplicate of this issue until I got the message of your comment :) The other duplicate is: http://bugs.python.org/issue1643641 which was closed by Georg Brandl upon my request. The oldest issue is: http://bugs.python.org/issue961805 Both these issues have my patch attached. (it's somewhat resembling yours and the proposition of Ron Provost - except that it is 1.5 years older) The latter issue also has demo code attached. Can someone close this one or the other open issue?? Cheers, Matthias Kievernagel