Don't understand wxPython ids
Greg Ewing
greg at cosc.canterbury.ac.nz
Thu Apr 29 00:47:51 EDT 2004
Roger Binns wrote:
> Here is how I use the same id in multiple locations. I can have a
> menu entry, a toolbar button, and a button inside some HTML all
> invoke the same function. The only coupling between them is
> the id number.
Giving an identifier to a command so that it can be
invoked in multiple ways is a good idea, but it would
be much more Pythonic if a *name* could be used as the
identifier rather than a number.
Use of a number here seems to be entirely the result
of blindly carrying over a feature of the C++-oriented
API into Python.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list