Removed m_clientData and related methods as it's now handled by the

wxClientDataContainer mixin.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-12-03 18:17:43 +00:00
parent bb064193a7
commit 1dc302a8ae
3 changed files with 10 additions and 29 deletions

View File

@@ -240,25 +240,17 @@ public:
// void SetClientData(wxObject *client_data);
// wxObject *GetClientData();
%addmethods {
void SetClientData(PyObject* userData) {
wxPyUserData* data = NULL;
if (userData)
data = new wxPyUserData(userData);
self->SetClientData(data);
}
PyObject* GetClientData() {
wxPyUserData* data = (wxPyUserData*)self->GetClientData();
if (data) {
Py_INCREF(data->m_obj);
return data->m_obj;
} else {
Py_INCREF(Py_None);
return Py_None;
}
}
}
// The real client data methods are being used for OOR, so just fake it.
%pragma(python) addtoclass = "
def SetClientData(self, data):
self.clientData = data
def GetClientData(self):
if hasattr(self, 'clientData'):
return self.clientData
else:
return None
"
void Show(bool show);
bool IsShown();