ListNoteBook widget doesn't work: "tkinter.TclError: invalid command name:..."

Bug #861925 reported by Emilio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-stdlib-extensions (Ubuntu)
New
Undecided
Unassigned

Bug Description

Trying to sue the widget results in:
_tkinter.TclError: invalid command name ".nb.nbframe.ventas.34874384.listnb.pane.p1.shlist.f1.hlist"
This error has been fixed in the ListNoteBook implementation in Tix 8.4.3, but it's not included in Ubuntu.

For Python 3.0 the following implementation works as expected:
class ListNoteBook(TixWidget):
    """A ListNoteBook widget is very similar to the TixNoteBook widget:
    it can be used to display many windows in a limited space using a
    notebook metaphor. The notebook is divided into a stack of pages
    (windows). At one time only one of these pages can be shown.
    The user can navigate through these pages by
    choosing the name of the desired page in the hlist subwidget."""

    def __init__(self, master, cnf={}, **kw):
       TixWidget.__init__(self, master, 'tixListNoteBook', ['options'], cnf, kw)
       self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
       self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb')

    def add(self, name, cnf={}, **kw):
       options = (self._w, 'add', name) + self._options(cnf, kw)
       self.tk.call(*options)
       self.subwidget_list[name] = TixSubWidget(self, name)
       return self.subwidget_list[name]

    def raise_page(self, name): # raise is a python keyword
       self.tk.call(self._w, 'raise', name)

lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

apt-cache policy python-tk
python-tk:
  Installed: 2.7-2ubuntu2
  Candidate: 2.7-2ubuntu2
  Version table:
 *** 2.7-2ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
        100 /var/lib/dpkg/status

apt-cache policy python3-tk
python3-tk:
  Installed: 3.2-1ubuntu1
  Candidate: 3.2-1ubuntu1
  Version table:
 *** 3.2-1ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: python-tk 2.7-2ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-11.50-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Sep 28 20:42:32 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python-stdlib-extensions
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Emilio (emilio-moretti) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.