ALT Linux Bugzilla
– Attachment 316 Details for
Bug 3285
tkinter fails to handle callbacks!
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
proposed fix
Python-2.3.x-tkinter.patch (text/plain), 2.03 KB, created by
Andrey V Khavryuchenko
on 2003-11-18 16:08:56 MSK
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Andrey V Khavryuchenko
Created:
2003-11-18 16:08:56 MSK
Size:
2.03 KB
patch
obsolete
>diff -ru Python-2.2.2.orig/Lib/lib-tk/Tkinter.py Python-2.2.2/Lib/lib-tk/Tkinter.py >--- Python-2.2.2.orig/Lib/lib-tk/Tkinter.py 2003-11-18 14:42:50 +0200 >+++ Python-2.2.2/Lib/lib-tk/Tkinter.py 2003-11-18 14:49:16 +0200 >@@ -1025,37 +1025,39 @@ > if len(args) != len(self._subst_format): return args > getboolean = self.tk.getboolean > getint = int >+ def getint_event(s): >+ """Tk changed behavior in 8.4.2, returning "??" rather more often.""" >+ try: >+ return int(s) >+ except ValueError: >+ return s >+ > nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args > # Missing: (a, c, d, m, o, v, B, R) > e = Event() > e.serial = getint(nsign) >- e.num = getint(b) >+ e.num = getint_event(b) > try: e.focus = getboolean(f) > except TclError: pass >- e.height = getint(h) >- e.keycode = getint(k) >- # For Visibility events, event state is a string and >- # not an integer: >- try: >- e.state = getint(s) >- except ValueError: >- e.state = s >- e.time = getint(t) >- e.width = getint(w) >- e.x = getint(x) >- e.y = getint(y) >+ e.height = getint_event(h) >+ e.keycode = getint_event(k) >+ e.state = getint_event(s) >+ e.time = getint_event(t) >+ e.width = getint_event(w) >+ e.x = getint_event(x) >+ e.y = getint_event(y) > e.char = A > try: e.send_event = getboolean(E) > except TclError: pass > e.keysym = K >- e.keysym_num = getint(N) >+ e.keysym_num = getint_event(N) > e.type = T > try: > e.widget = self._nametowidget(W) > except KeyError: > e.widget = W >- e.x_root = getint(X) >- e.y_root = getint(Y) >+ e.x_root = getint_event(X) >+ e.y_root = getint_event(Y) > try: > e.delta = getint(D) > except ValueError: >ôÏÌØËÏ × Python-2.2.2/Lib/lib-tk: Tkinter.py~
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3285
: 316