> Well, certainly in Python all you'd need to do is set the
> instance.__class__ member to point to the stubbed Python class. Don't
> know whether you'd consider that "safe", but it certainly seems to work
> with Python 2.2. Given that wxPython is using wrapper Python classes
> (as opposed to object inheriting from built-in types), it would seem
> workable.
>
> i.e. the C equivalent of
>
> setattr( my_Python_instance, '__class__', StubClassPointer )
>
> But I might be missing something...Right, not sure why I didn't think of __class__... I'll give it a try.
I guess that should be I don't know why I didn't *see* __class__ in your
original message! <duh!>
ยทยทยท
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!