lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello Peter,
For SWIG no problem, it just works out of the box.

SWIG has trouble with nested classes when the declarations are nested.

eg.
struct B {
  struct A {
    int m;
  };
  A a;
};

But I just tested the code you gave, it worked first time.

Regards,
Mark

> Hello,
> 
> is it possible with tolua++ or swig to bind nested
> properties like with luabind?
> 
> http://www.rasterbar.com/products/luabind/docs.html#properties
> 
> -- C:
> struct A {
>   int m;
> };
> struct B {
>   A a;
> };
> 
> -- Lua:
> b = B()
> b.a.m = 1
> print(b.a.m)
> 
> 
> Peter