[C++-sig] python override of C++ virtual mem fun not exactly working yet
DRandallTaylor
DRandallTaylor at yahoo.com
Sat Apr 1 23:45:25 CEST 2006
I've added the invocation of the base class constructor (thanks Stefan):
class InboxListener(Callback):
def __init__(self, sess):
Callback.__init__(self)
self.inbox = sess.CreateInbox(self) # ArgumentError here
def OnData():
print "OnData called"
But I still get this:
ArgumentError: Python argument types in
VIAmSession.CreateInbox(Session, InboxListener)
did not match C++ signature:
CreateInbox(class Session {lvalue}, class Callback {lvalue})
Python does not yet know that my InboxListener is derived from Callback. How
shall I tell her?
Cheers.
More information about the Cplusplus-sig
mailing list