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.
| Author | gpolo |
|---|---|
| Recipients | gpolo |
| Date | 2008年07月18日.12:52:41 |
| SpamBayes Score | 0.030161176 |
| Marked as misclassified | No |
| Message-id | <1216385566.01.0.7972232454.issue3405@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Follows a patch that adds support for the new data option supported
event generate. It allows virtual events to pass a tcl object.
This patch is only intended to correctly support tcl objects, trying to
pass other objects (like a dict) will result in None being returned. If
you want to correctly pass and receive a dict, make it an attribute of
the tcl object being passed.
E.g.:
import Tkinter
def handle_it(event):
print event.data.something
root = Tkinter.Tk()
root.something = {1: 2}
root.after(1, lambda: root.event_generate('<<Test>>', data=root))
root.bind('<<Test>>', handle_it)
root.mainloop() |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年07月18日 12:52:46 | gpolo | set | spambayes_score: 0.0301612 -> 0.030161176 recipients: + gpolo |
| 2008年07月18日 12:52:46 | gpolo | set | spambayes_score: 0.0301612 -> 0.0301612 messageid: <1216385566.01.0.7972232454.issue3405@psf.upfronthosting.co.za> |
| 2008年07月18日 12:52:44 | gpolo | link | issue3405 messages |
| 2008年07月18日 12:52:44 | gpolo | create | |