Don't understand wxPython ids
Greg Krohn
greg at invalid.invalid
Wed Apr 28 04:06:55 EDT 2004
Grant Edwards wrote:
> That's definitely getting closer to what I would expect in
> something designed in the last 15-20 years, though passing the
> binding as a parameter to wx.Button() sure seems like the
> obvious solution for 90% of the cases I run into. Perhaps I'm
> too used to Tk.
I totally agree with you. The Tk way seems much more natural.
>>I can only think of one reasn why they chose to use ids in the first
>>place. Assigning many objects the same id allows you to use one EVT_*
>>call for those objects. But is that really a useful feature? Who knows?
>
>
> That's about the only thing I could think of. The few
> situations where I'd have wanted to do someting like that I'd
> gladly put a for-loop iterating over a list of objects in
> exchange for being able to use single-line of code the other
> 90% of the time.
Ditto. You'd think it wouldn't be so hard to add a kwarg for it. At
least if it's something you can add on the Python side. Hmmm.
greg
More information about the Python-list
mailing list