This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: xview/yview of Tix.Grid is broken
Type: behavior Stage:
Components: Tkinter Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: georg.brandl, gpolo, loewis, mkiever, ocean-city
Priority: normal Keywords: patch

Created on 2007-09-09 05:07 by ocean-city, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_tixGrid.py ocean-city, 2007-09-09 05:07
fix_tixGrid.patch ocean-city, 2007-09-09 05:08
xview_yview.patch ocean-city, 2007-09-19 11:55
partial.patch ocean-city, 2007-10-27 15:37
xview_yview_mixins.diff gpolo, 2009-08-07 13:36
Messages (11)
msg55762 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2007-09-09 05:07
Attached code "test_tixGrid.py" fails with following error message.

TypeError: yview() takes exactly 1 argument (4 given)
msg55763 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2007-09-09 05:08
Probably right fix is attached file "fix_tixGrid.patch"
msg55994 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2007-09-18 12:43
I can verify that on Red Hat 7 Python 2.5 that the test does fail and
the patch resolves it.
msg56028 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-09-19 06:36
IMO the patch is not complete, the xview method should rather be
implemented like these in Tkinter.py.

Assigning to Martin.
msg56036 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2007-09-19 11:55
OK, how about this patch? I extracted [xy]view{,_moveto,_scroll}
as mixin class [XY]View, and included them. It seems working.
msg56413 - (view) Author: Matthias Kievernagel (mkiever) * Date: 2007-10-14 13:13
Hint: There is also Issue1522587,
which contains a large patch
(by klappnase) for Tix.Grid addressing
xview/yview and several other issues.
I do not know if it fixes this issue exactly.
Can you take a look at it, ocean-city?

Regards,
Matthias Kievernagel
msg56855 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2007-10-27 15:37
Sorry for late repry. I couldn't apply Issue1522587's patch itself
because it was too old, so I tried only [xy]view{,_moveto,_scroll}
functions by applying patch partially. (partial.patch) And yes, it worked.
msg78876 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-01-02 20:57
I would actually prefer to move xview and yview method to classes like
it was done in xview_yview.patch (I've done this on a personal branch
some time ago too, but named them as XScroll, YScroll), we can see they
are used in several places in Tkinter, Tix and other extensions, and we
are just duplicating code for them all the time.

Also, what I would prefer to see in place of this:

if not args:
    return self._getdoubles(self.tk.call(self._w, 'xview'))
self.tk.call((self._w, 'xview') + args)

would be this:

res = self.tk.call(self._w, 'xview', *args)
if args:
    return self._getdoubles(res)
msg91403 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-08-07 13:36
I've looked into this again and now I'm attaching a patch very similar
to xview_yview.patch. Is anyone against adding these mixins ?
msg91551 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-08-14 14:37
This has been commited on r74448 now, will merge into py3k.
msg91553 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-08-14 15:07
> This has been commited on r74448 now, will merge into py3k.

py3k: r74450
History
Date User Action Args
2022-04-11 14:56:26adminsetgithub: 45476
2009-08-14 15:07:34gpolosetmessages: + msg91553
2009-08-14 14:37:22gpolosetstatus: open -> closed
resolution: accepted
messages: + msg91551

versions: + Python 2.7, Python 3.2, - Python 2.6, Python 2.5
2009-08-07 13:36:30gpolosetfiles: + xview_yview_mixins.diff

messages: + msg91403
2009-01-02 20:57:14gpolosetnosy: + gpolo
messages: + msg78876
2007-10-27 16:39:39loewissetkeywords: + patch
2007-10-27 15:37:47ocean-citysetfiles: + partial.patch
messages: + msg56855
2007-10-14 13:13:53mkieversetnosy: + mkiever
messages: + msg56413
2007-09-19 11:55:17ocean-citysetfiles: + xview_yview.patch
messages: + msg56036
2007-09-19 06:36:27georg.brandlsetassignee: loewis
messages: + msg56028
nosy: + loewis, georg.brandl
2007-09-18 12:44:24jafosetnosy: - jafo
2007-09-18 12:43:18jafosetpriority: normal
nosy: + jafo
messages: + msg55994
2007-09-15 03:32:56ocean-citysetversions: + Python 2.6
2007-09-09 05:08:18ocean-citysetfiles: + fix_tixGrid.patch
messages: + msg55763
2007-09-09 05:07:25ocean-citycreate