Pushing the same event handler More than once
Laurent Humbertclaude
laurent.humbertclaude at gmail.com
Tue Sep 5 05:35:43 PDT 2006
Hello,
First, the context : I am using wx 2.7.0 with VC8 on winXP sp2.
Then, the problem :
When pushing an event handler to more than one wxWindow, the
application breaks after triggering an assert :
14:11:09: ..\..\src\common\containr.cpp(117): assert "winParent"
failed in wxControlContainer::SetLastFocus(): Setting last focus for a
window that is not our child?
Did I make something wrong ? Quoting the wxDoc :
" This way, you can avoid a lot of class derivation, and use the same
event handler object to handle events from instances of different
classes. "
Do I need to have a different wxEvtHandler per instance ?
I join a minimal sample modification that trigger the assertion and crash.
Thanks in advance
Laurent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugEventHandling.patch
Type: application/octet-stream
Size: 2037 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wx-users/attachments/20060905/40=
486fe8/bugEventHandling.obj
More information about the wx-users
mailing list