lua-users home
lua-l archive

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


> Using Classlib, LOOP or any other Lua library with OOP support, how
> can I do this?

I did this as part of the winapi binding I'm working on. What you're
looking for is in vobject.lua. It supports r/w and r/o properties and
"stored" properties (those that have a setter but no getter). At a
first glance I can't see any dependencies so you should be able to use
the code without tweaking apart from the module organization.

http://code.google.com/p/lua-winapi/source/browse/winapi/class.lua
http://code.google.com/p/lua-winapi/source/browse/winapi/object.lua
http://code.google.com/p/lua-winapi/source/browse/winapi/vobject.lua

Hope it helps.