When I try to set the 'raisecommand' option in PmwNoteBook, I get this:
TclError Exception in Tk callback
Function: <class __main__.MiscellaneousTables at 0x7756f8> (type: <type 'class'>)
Traceback (innermost last):
File "Pmw.py", line 1772, in __call__
return apply(self.func, args)
File "Window.py", line 98, in __init__
initialization = self.populate()
File "MiscellaneousTablesWindow.py", line 260, in populate
self._makepage(pagename, table['tag'], table['fmt'])
File "MiscellaneousTablesWindow.py", line 705, in _makepage
File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1085, in configure
TclError: unknown option "-raisecommand"
Here's a code snippet. Please let me know if you need to see more:
def command(command=self._enable_buttons, page=pagename):
Any ideas what's going on?
The raisecommand option is an option of a Pmw.NoteBook. It appears that you are passing the option to one of the pages of the notebook rather than the notebook itself. So you need to do something like:
def _enable_buttons(self, pagename):
print pagename, 'raised'
Yep. That's a problem. I'm trying to port some old Pmw code (used NoteBookR) to the new NoteBook.
I may just try to get the old NoteBookR widget working with the new Pmw and later python versions depending on how much work it is. Choices!
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.