Message47770
Logged In: YES
user_id=488897
If we use _register without modification, we'll end up with
a different command name:
>>> from Tkinter import Label
>>> l = Label(text="some text")
+ Tkinter created command -1214096332_tkerror
+ Tkinter created command -1208510068_exit
+ Tkinter created command -1208511348destroy
>>>
whereas the command names should be "_tkerror", "_exit".
We can modify the _register functon so that it takes an
optional "name" keyword argument. However, it will mean that
we create the command through the CallWrapper instead of the
command directly. For "_exit", if I understand the code
correctly, it would mean that the raise in _exit is obscured
by the raise in CallWrapper, which doesn't seem the right thing.
So I would suggest to add a "if self._tclCommands==None:" to
the patch instead of going through _register. I'll update
the patch if you agree. |
|
Date |
User |
Action |
Args |
2007-08-23 15:41:49 | admin | link | issue1121234 messages |
2007-08-23 15:41:49 | admin | create | |
|