Lindsay Mathieson's newest wxActiveX class has been wrapped into a new
extension module called wx.activex. Lots of demo and lib updates to go along with it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1425,6 +1425,17 @@ void wxPyCallback::EventThunker(wxEvent& event) {
|
||||
if (!arg) {
|
||||
PyErr_Print();
|
||||
} else {
|
||||
// Check if the event object needs some preinitialization
|
||||
if (PyObject_HasAttrString(arg, "_preInit")) {
|
||||
result = PyObject_CallMethod(arg, "_preInit", "O", arg);
|
||||
if ( result ) {
|
||||
Py_DECREF(result); // result is ignored, but we still need to decref it
|
||||
PyErr_Clear(); // Just in case...
|
||||
} else {
|
||||
PyErr_Print();
|
||||
}
|
||||
}
|
||||
|
||||
// Call the event handler, passing the event object
|
||||
tuple = PyTuple_New(1);
|
||||
PyTuple_SET_ITEM(tuple, 0, arg); // steals ref to arg
|
||||
|
Reference in New Issue
Block a user