From 70f6f447b40d13e5cffabf12d7ba67b5de0e8c63 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 21 Jul 2017 16:18:06 -0700 Subject: [PATCH] Apply the usual fix for Get/SetClientData --- etg/propgridproperty.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/etg/propgridproperty.py b/etg/propgridproperty.py index c2fcf41a..8b97f191 100644 --- a/etg/propgridproperty.py +++ b/etg/propgridproperty.py @@ -96,6 +96,25 @@ def run(): c.find('AddPrivateChild.prop').transfer = True c.find('AddChild.prop').transfer = True + # The [G|S]etClientData methods deal with untyped void* values, which we + # don't support. The [G|S]etClientObject methods use wxClientData instances + # which we have a MappedType for, so make the ClientData methods just be + # aliases for ClientObjects. From the Python programmer's perspective they + # would be virtually the same anyway. + c.find('SetClientObject.clientObject').transfer = True + c.find('SetClientObject.clientObject').name = 'data' + c.find('GetClientData').ignore() + c.find('SetClientData').ignore() + c.find('GetClientObject').pyName = 'GetClientData' + c.find('SetClientObject').pyName = 'SetClientData' + c.addPyMethod('GetClientObject', '(self, n)', + doc="Alias for :meth:`GetClientData`", + body="return self.GetClientData(n)") + c.addPyMethod('SetClientObject', '(self, n, data)', + doc="Alias for :meth:`SetClientData`", + body="self.SetClientData(n, data)") + + c = module.find('wxPGChoicesData') tools.ignoreConstOverloads(c)