ListNoteBook widget doesn't work: "tkinter.TclError: invalid command name:..."
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.
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(
"""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):
def add(self, name, cnf={}, **kw):
options = (self._w, 'add', name) + self._options(cnf, kw)
return self.subwidget_
def raise_page(self, name): # raise is a python keyword
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://
100 /var/lib/
apt-cache policy python3-tk
python3-tk:
Installed: 3.2-1ubuntu1
Candidate: 3.2-1ubuntu1
Version table:
*** 3.2-1ubuntu1 0
500 http://
100 /var/lib/
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: python-tk 2.7-2ubuntu2
ProcVersionSign
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelMo
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-
UpgradeStatus: No upgrade log present (probably fresh install)