event usage question

Tim Black wrote:

I'm using command event propagation to propagate a wx.ContextMenuEvent up from
child widget to its parents. Along the way, I'd like to pass information from
the child to its parents that receive and process the same event. I can bind a
new member to the existing event object in the child handler, but the event
passed to the parent handler doesn't have the new member. Either it is a
different event object, or somehow the new member was deleted?

It is a different object. More specifically, it is a different Python proxy of the same C++ object. Each time an event handler is called a new proxy is wrapped around the C++ class and passed to the function, and the proxy goes away at the end of the function.

Can the wx.CommandEvent::GetClientData method be used to store this extra
user-defined data?

No, that value is already used by wxPython for other purposes.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!