[luabind] inheritance and class instances in LUA
Brought to you by:
arvidn,
daniel_wallin
From: Dmitriy I. <ias...@gs...> - 2004-04-22 13:17:11
|
Hello, I found one more problem with using classes in LUA. I exported polymorphic class A to LUA. I declared in LUA class B which is derived from A. In class B I declared string class member str and assigned it with value "myself" I created instance b of the class B. I pushed b to C++ via C++ function "set", which receives pointers to instances of the class A. I called function "get" which returns pointer to instance of the class A, which was assigned by previous call of the function "set" and saved the result in local variable temp. Then when I try to get value of the string class member temp.str I get an error, because class member temp.str is nil. Is it possible to implement such a scheme? -- Best regards, Dmitriy mailto:ias...@gs... |