I saw the discussion on the wiki about this, but I’m still not sure I understand the why’s and wherefores of it all.
I have one Panel that has the following code in it…
self.Bind(wx.EVT_CHOICE, self.adjust_ability_lists, id=ABILITY_ID)
It works beautifully any time any widget with the id of ABILITY_ID is selected adjust_ability_lists is called.
Building on that work I created another Panel it had the following code in it…
self.Bind(wx.EVT_CHOICE, self.adjust_available_classes, id=ALIGNMENT_ID)
It didn’t work so well. adjust_available_classes was NEVER called.
I changed the code above to be…
self.EthicsChoice.Bind(wx.EVT_CHOICE, self.adjust_available_classes)
and everything worked just as I expected it to.
I’m sure this has to do with both Panels being part of the same Frame and something about Event propagation I don’t understand, but I hate having two different idioms in my code and would love to either a) understand enough about what was going on in the first case to fix it or b) understand enough of the pitfalls or problems (if there are any) in my second example to convert all my other working code that uses the first idiom into the second.
···
–
Stand Fast,
tjg.