[Python-bugs-list] [ python-Bugs-484994 ] bugs in Tix.py ListNoteBook PanedWindow

noreply@sourceforge.net noreply@sourceforge.net
Fri, 29 Mar 2002 01:43:03 -0800


Bugs item #484994, was opened at 2001-11-23 23:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=484994&group_id=5470

Category: Tkinter
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert Roy (rjroy)
Assigned to: Nobody/Anonymous (nobody)
Summary: bugs in Tix.py ListNoteBook  PanedWindow

Initial Comment:
Python 2.2b2
Tix.py
1)
class ListNoteBook, __init__ method calls base class 
__init__  method with "tixDirList" instead 
of "tixListNoteBook"

2)
class PanedWindow, panes method, does not split the 
string returned from self.tk.call(self._w, 'panes')


patch also adds:
access to the paned window in ListNoteBook
class dummyPanedWindow to support above
paneconfigure methods to PanedWindow 
pageConfigure methods to NoteBook and ListNoteBook
page and pages methods to ListNoteBook


I am attaching the pathched file as well as the 
following diff
################

1044c1044,1046
<        TixWidget.__init__(self, 
master, 'tixDirList', ['options'], cnf, kw)
---
>        TixWidget.__init__(self, 
master, 'tixListNoteBook', ['options'], cnf, kw)
>        self.subwidget_list['pane'] = 
_dummyPanedWindow(self, 'pane',
>                                                 
destroy_physically=0)
1048d1049
< 
1054a1056,1070
>     def page(self, name):
>        return self.subwidget(name)
> 
>     def pages(self):
>        # Can't call subwidgets_all directly because 
we don't want .nbframe
>        names = self.tk.split(self.tk.call
(self._w, 'pages'))
>        ret = []
>        for x in names:
>            ret.append(self.subwidget(x))
>        return ret
> 
>     def pageconfigure(self, name, 
**kw):              
>        apply(self.tk.call,
>              (self._w, 'pageconfigure', name) + 
self._options(kw))
> 
1099a1116,1119
>     def pageconfigure(self, name, 
**kw):              
>        apply(self.tk.call,
>              (self._w, 'pageconfigure', name) + 
self._options(kw))
> 
1162c1182
<        names = self.tk.call(self._w, 'panes')
---
>        names = self.tk.split(self.tk.call
(self._w, 'panes'))
1167a1188,1191
>     def paneconfigure(self, name, 
**kw):              
>        apply(self.tk.call,       
>              (self._w, 'paneconfigure', name) + 
self._options(kw))
> 
1571a1596,1599
>        TixSubWidget.__init__(self, master, name, 
destroy_physically)
> 
> class _dummyPanedWindow(PanedWindow, TixSubWidget):
>     def __init__(self, master, name, 
destroy_physically=1):




----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-03-29 10:43

Message:
Logged In: YES 
user_id=21627

The current revision of Tix.py is 1.9; it is available from

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/python/python/dist/src/Lib/lib-tk/Tix.py?rev=1.9&content-type=text/plain

It would be nice if you could regenerate the patch for the
current version of Tix.py, so that it could get included
into Python 2.3.

----------------------------------------------------------------------

Comment By: Robert Roy (rjroy)
Date: 2001-12-10 03:34

Message:
Logged In: YES 
user_id=352797

Thanks for reviewing my submission. I will make sure to do 
a context diff next time I submit something. 

The pages method that I added is applied to the 
listNoteBook class not the tixPanedWindow class. It is 
inherited from the vstack base class.

Where can I find the later version? Do I have to get them 
from the source tree?

Bob Roy.



----------------------------------------------------------------------

Comment By: Internet Discovery (idiscovery)
Date: 2001-12-10 00:36

Message:
Logged In: YES 
user_id=33229

The first part of the patch was a definite bug, but your diffs are
against Tix.py 1.5, and the bug is fixed in the current version
1.6. (I've also submitted a new version (1.7?)  to the patch queue).

You're right about the splitlist, but the next part of the patch is
partly wrong: there is no 'pages' method to the tixPanedWindow. 
The methods of the class in Tcl Tix are:

	add delete forget manage panecget paneconfigure panes setsize

I appreciate your help on getting the PanedWindow implementation complete.
Could I ask you to check the Tcl Tix documentation and code carefully and
resubmit this patch against 1.7 when it comes out, perhaps with
some of the other missing methods as well?

To speed things up for Martin, it could be best to use a context diff
diff -c <old> <new> and upload the result as a file.

Mike Clarkson

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-12-06 17:15

Message:
Logged In: YES 
user_id=3066

I've asked Mike Clarkson (Tix.py guru) to take a look at this.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=484994&group_id=5470