Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What use is %E in bindings?

31 views
Skip to first unread message

Dave

unread,
Mar 15, 2017, 2:30:30 PM3/15/17
to
While playing around with bind/event, I noticed the following:

package require Tk
label .test -text "Click me"
pack .test
bind .test <Button-1> "event generate %W <Button-2>"
bind .test <Button-2> "puts %%E=%E"

Clicking on the label with either button 1 or 2 results in "%E=0"

Why?

My reading of the docs suggested that %E would be 0 when I actually
clicked with button 2 but would be 1 when caused by the "event generate".

If the answer is that I did not use "-sendevent 1" on my "event
generate", then what use is %E if one can arbitrarily set it?

--
computerjock AT mail DOT com
0 new messages