Next: 2.3.2.2 Property Access in
Up: 2.3.2 Using Methods and
Previous: 2.3.2 Using Methods and
  Contents
To read or write properties in generic LuaCOM objects, it's
necessary access them as method calls with the right prefix
(get/set). The simpler semantic of table field access does not work
here.
obj_typ = luacom.CreateObject("Some.TypedObject")
obj_untyp = luacom.CreateObject("Untyped.Object")
-- property read (get)
a = obj_typ.Value
b = obj_untyp:getValue()
-- property write (set)
obj.typ = a + 1
obj_untyp:setValue(b + 1)
Vinicius da Silva Almendra
2003-06-27