lua-users home
lua-l archive

toLua query

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


Hi,

Slightly off-topic I know. I’ve been trying to understand exactly what the ‘mapsuper’ method of the tolua library does without success.

I have the following classes: Shape & Line:Shape

My quick and dirty table printer shows that the metatable inheritance chain of these classes is as follows:

Commonclass <- Shape <- Line <- const Line

Commonclass <- Shape <- const Shape

Whereas the tolua_super table which I believed to be a repository of super classes is as follows

{tolua_super} -> {

{const Line} -> {

“const “ -> 1

“const Shape” -> 1

}

{const Shape} -> {

“const “ -> 1

}

{Line} -> {

“” -> 1

“const Line” -> 1

“Shape” -> 1

“const Shape” -> 1

}

{Shape} -> {

“” -> 1

“const Shape” -> 1

}

}

Which doesn’t seem at all in keeping with the inheritance chain.

I would greatly appreciate it if someone with some experience in the toLua architecture could help me understand what’s going on here.

Many Thanks

Anthony


AltStyle によって変換されたページ (->オリジナル) /