ListItem.owner readonly
Get the List that owns the ListItem.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("ListItem.owner sample", "fixed", 320, 250)
local list = ui.List(win, {"Item 1", "Item 2", "Item 3"})
function list:onSelect(item)
win:status(item.text.." is selected")
assert(item.owner == self)
end
list.selected = list.items[1]
win:show()
-- update user interface
repeat
ui.update()
until not win.visible