lua-users home
lua-l archive

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


I am having trouble using nested classes with toLua. For example:

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.

Thank you,

Cameron Tofer