New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tix:NoteBook add/delete/add page problem #36091
Comments
Problem: NoteBook add/delete/add page with the same Example Python Script for reproducing the Bug: import Tix
import rlcompleter
root=Tix.Tk()
notebook=Tix.NoteBook(root, ipadx=3, ipady=3)
notebook.add('general', label="General", underline=0)
notebook.add('displaymode', label="Display mode",
underline=0)
notebook.pack()
notebook.delete('general')
notebook.add('general', label="General", underline=0)
la=Tix.Label(notebook.general,text="hallo")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/lib-tk/Tkinter.py", line
2261, in __init__
Widget.__init__(self, master, 'label', cnf, kw)
File "/usr/lib/python2.2/lib-tk/Tkinter.py", line
1756, in __init__
self.tk.call(
TclError: bad window path name
".135915860.nbframe.general" Tix seems nothing to know about the new page
>>> notebook.tk.call(notebook._w,'pages')
'displaymode' Analysis: Solution: Patch:
derrick:chris$ diff -u
/usr/lib/python2.2/lib-tk/Tix.py Tix.py
--- /usr/lib/python2.2/lib-tk/Tix.py Sun Nov 4
01:45:36 2001
+++ Tix.py Tue Feb 12 23:41:50 2002
@@ -828,12 +828,13 @@
def add(self, name, cnf={}, **kw):
apply(self.tk.call,
(self._w, 'add', name) +
self._options(cnf, kw))
- self.subwidget_list[name] =
TixSubWidget(self, name)
+ self.subwidget_list[name] =
TixSubWidget(self, name, destroy_physically
return self.subwidget_list[name]
def delete(self, name):
+ del self.subwidget_list[name]
self.tk.call(self._w, 'delete', name)
-
+
def page(self, name):
return self.subwidget(name)
Tix.py Version Tix Version Tcl/Tk-version |
Logged In: YES Okay, this is my first bug report, and seems not a good |
Logged In: YES This is fixed in Tix.py 1.8. Notice that setting Instead, the problem was that the line self.subwidget_list[name] = TixSubWidget(self, name) would first create the new subwidget, then remove the last |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: