Re: [C++-sig] Executing scripts in other namespace than __main__

2010-03-18 Thread Fabzter
Hi. The only way I could deal with this issue was to keep track of every class derived from the BaseClass, in order to _not_ using it again to instantiate an object. I changed this: > exec("import sys\n", namespace_module_main, >namespace_module_main); to: > exec(

Re: [C++-sig] Having problems with returned object.

2010-03-18 Thread Fabzter
Thank you. My problems was obviously not about std::vector, since I had already wrapped it. And sorry for my bad formed example, I was in some kind of hurry while writing it. Anyways, I already solved this problem, sorry for my former lack of detail. ___

[C++-sig] Executing scripts in other namespace than __main__

2010-03-17 Thread Fabzter
Hi everybody, it's my annoying again. I have a pure virtual class in C++ wich I have wrapped and exposed (call it BaseClass), and I let the users inherit from it to make their own class in their script. It's worth noting that I do not know the name of such class they are creating. When I load only

[C++-sig] Having problems with returned object.

2010-03-15 Thread Fabzter
Hi everybody, I'll try to describe my problem: I have this c++ class (simplyfied): --- class MyClass { public: MyClass() { this->setPos(0, 0); } MyClass(const MyClass& orig) {