Menu

#10 EntryField exception

closed-invalid
nobody
None
5
2012-07-12
2003-03-05
John Speno
No

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.

Discussion

  • John Speno

    John Speno - 2003-03-30

    Logged In: YES
    user_id=2138

    I should add that this was a Tcl/Tk bug and is fixed in 8.4.2.

     
  • Adrian

    Adrian - 2012-07-12

    old TCL bug

     
  • Adrian

    Adrian - 2012-07-12
    • status: open --> closed-invalid
     

Log in to post a comment.