edit_modified() bug in Tkinter?

G

George Trojan

The call

print self.ed.edit_modified()

where self.ed is t.component('text'), and t is Pmw.ScrolledText(),
gives the following traceback:

Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/local/python/lib/python2.3/lib-tk/Tkinter.py", line 1346,
in __call__
return self.func(*args)
File "ed.py", line 30, in redo
print self.ed.edit_modified()
File "/usr/local/python/lib/python2.3/lib-tk/Tkinter.py", line 2832,
in edit_modified
return self.edit("modified", arg)
File "/usr/local/python/lib/python2.3/lib-tk/Tkinter.py", line 2820,
in edit
return self._getints(
File "/usr/local/python/lib/python2.3/lib-tk/Tkinter.py", line 973,
in _getints
return tuple(map(getint, self.tk.splitlist(string)))
TypeError: coercing to Unicode: need string or buffer, bool found

Is the following fix in Tkinter.py, line 2831, a reasonable thing to do?

# return self.edit("modified", arg)
return self.tk.call((self._w, 'edit', 'modified') + (arg,))

I'd prefer not to modify Python distribution code.

George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top