This is one from the series of tutorials available on our site, many of the earlier tutorials were aimed towards a Mexican beer type framework, now they are more general in nature and applicable to most frameworks that use Lua.
http://howto.oz-apps.com/2012/01/safely-create-member-functions-in-lua.html
Comments
For example:
for each method in string object we can pass string to it
I would say it is similar to having static and instance method in one
When writing an article for the other framework, most users do not even know what a variable is, where as most users here are ones that write plug-ins etc. So, it is difficult ...
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Also I want to add a little info:
Although x:foo(y) is same with x.foo(x, y), x:foo(y) is _a little bit_ faster because Lua VM has a special opcode for : operator.