Hopefully this is the right forum for this.
I'm trying to wrap a class with SWIG. The class has a number of virtual functions, which are overridden in Python.
class Application {
public:
void run();
void stop();
};
So in Python I have:
class MyApp(g.Application):
_format = None
def __init__(self):
print("Initialising app")
def run(self):
g.Application.run(self)
pass
app = MyApp()
app.create()
app.run()
When the Python run() function executes, I get:
Traceback (most recent call last):
File "test.py", line 37, in ?
app.run()
File "test.py", line 24, in run
g.gzApplication.run(self)
File "D:\Development\swig\g.py", line 52, in run
def run(*args): return _g.Application_run(*args)
TypeError: Expected a pointer
I'm really not sure how to fix this. Any help greatly appreciated.
Thanks
Edit: Oh man! Can't believe I posted this into the wrong forum! Please move this into the Scripting forum. Thanks!