lua-users home
lua-l archive

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


John McKenna wrote:

state, pressure = controller.button

These are the multiple values we want to return from __index.

Why not return them in a table:
  state, pressure = unpack(controller:button())
or
  btn = controller:button()
  -- use btn.state, btn.pressure

--
Shmuel