Platform: MacOS X 10.2.4, Python 2.3a2, Pmw 1.1, Tcl/Tk 8.4.1
This program:
import Pmw
import Tkinter
root = Tkinter.Tk()
combo = Pmw.ComboBox(root,
labelpos='w',
label_text='test:',
fliparrow=1,
entry_state='disabled')
combo.pack()
choices = ['one', 'two']
combo.setlist(choices)
combo.setentry('two')
raises this exception:
Traceback (most recent call last):
File "x.py", line 16, in ?
combo.setentry('two')
File "<string>", line 1, in setentry
File "Pmw.py", line 3214, in setentry
self._preProcess()
File "Pmw.py", line 3090, in _preProcess
if self._entryFieldEntry.selection_present():
File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/Tkinter.py", line 2277, in selection_present
return self.tk.getboolean(
_tkinter.TclError: expected boolean value but got ""
If the ComboBox is created with entry_state='normal', it does not raise this exception.
Logged In: YES
user_id=2138
This turns out to be a bug/feature in newer versions of Tk. See
http://sourceforge.net/tracker/?group_id=12997&atid=112997&func=detail&aid=637828
that's bug ID 637828 on SF.net's Tk bug pages.
Sorry about the false alarm.
Logged In: YES
user_id=2138
I should add that this was a Tcl/Tk bug and is fixed in 8.4.2.
old TCL bug