Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
043bbc7d
Kaydet (Commit)
043bbc7d
authored
Mar 29, 2003
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #707701: Expect '??' in event fields. Fixes #698517.
Will backport to 2.2.
üst
694570ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
16 deletions
+32
-16
Tkinter.py
Lib/lib-tk/Tkinter.py
+32
-16
No files found.
Lib/lib-tk/Tkinter.py
Dosyayı görüntüle @
043bbc7d
...
...
@@ -1035,38 +1035,54 @@ class Misc:
"""Internal function."""
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
()
# serial field: valid vor all events
# number of button: ButtonPress and ButtonRelease events only
# height field: Configure, ConfigureRequest, Create,
# ResizeRequest, and Expose events only
# keycode field: KeyPress and KeyRelease events only
# time field: "valid for events that contain a time field"
# width field: Configure, ConfigureRequest, Create, ResizeRequest,
# and Expose events only
# x field: "valid for events that contain a x field"
# y field: "valid for events that contain a y field"
# keysym as decimal: KeyPress and KeyRelease events only
# x_root, y_root fields: ButtonPress, ButtonRelease, KeyPress,
# KeyRelease,and Motion events
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment