You shouldn't actually have to recurse anything. When you do something like 'bnvar = Button.new()', you're making an instance of Button. The values you initialize in Button.new are private to bnvar but bnvar has been hooked up to Button (via metatable) so if you have something like Button:Draw() or Button:SetText(), you can execute those functions for bnvar like so: 'bnvar:SetText(mytext)'.
function Button:SetText(newtext)
self.text = newtext;
end
Feel free to take a look at the gui.lua module in Militia Defense, or even the units in gamedata.lua. It can get pretty nasty as I get a pretty lazy attitude when I'm working in lua, but the class concept and implementation should be sound.
If anyone's still interested in my classes system, you can now find it on the wiki (the one in this thread creates an infinite loop, I shouldn't update without testing).
Link: http://love2d.org/wiki/index.php?title= ... ass_System
No problem. Appleide's talking about making it support multiple inheritance etc, but I wonder if I can still call it SECS then.. Maybe I should create two version, the basic one and the advanced one. (well, you might also argue I call it simple because it is trivial to use)