Posts: 2067 from 2003/3/5
While using MUI from Lua is cool, I'd go for the proper OO approach Lua is capable of. It shouldn't be too hard to allow subclassing with Lua.
You generally need a BOOPSi dispatcher that will perform a lookup of the MUIM_ value in lua class' metatable to determine whether a method was overloaded or not. You'd have to parse mui.h in order to find which method belongs to which class too, etc. A bit of work but doable.
This is generally how ObjectiveC MUI was implemented - its code is actually in large parts generated with OO lua that internally has a class corresponding to each supported MUI class.