Setting raisecommand in NoteBook

John Speno
  • John Speno

    John Speno - 2002-11-07

    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'>)
      Args: ()
    Traceback (innermost last):
      File "", line 1772, in __call__
        return apply(self.func, args)
      File "", line 98, in __init__
        initialization = self.populate()
      File "", line 260, in populate
        self._makepage(pagename, table['tag'], table['fmt'])
      File "", line 705, in _makepage
      File "/usr/local/lib/python2.2/lib-tk/", line 1085, in configure, '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?

    • Greg McFarlane

      Greg McFarlane - 2002-11-08

      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'

      • John Speno

        John Speno - 2002-11-08

        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.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks