lua-users home
lua-l archive

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


>class Test1
>{
>    Test1();
>    int x;
>    int y;
>    int z;
>};
>
>class Test2
>{
>    Test2();
>    int a;
>    int b;
>    Test2    c;
>};
>
>
>
>at the lua prompt:
>myclass = Test2:new();
>
>--this line does not work
>myclass.c.x = 5;
>
>
>--i can get around it by
>temp = myclass.c;
>temp.x=5;
>
>
>Is this a problem with toLua, or me.  It would be very helpful if this
worked.


look again; "c" is of type Test2, not Test1 -- there is no "x". :)

jdm