This is what I could figure out from experimentation. There's probably much more.
Sub RunUserInterface()
screenFacade = CreateObject("roPosterScreen")
screenFacade.showMessage("roListScreen test")
screenFacade.show()
port = CreateObject("roMessagePort")
roLS = CreateObject("roListScreen")
roLS.setMessagePort(port)
roLS.SetContent([{title:"This is the first item"},{title:"Another item"},{title:"The third item"}])
roLS.show()
while true
msg = wait(0, port)
if type(msg) = "roListScreenEvent"
print "Event: ";type(msg)
print msg.GetType(),msg.GetIndex(),msg.GetData()
if msg.isScreenClosed() then 'ScreenClosed event'
print "Closing list screen"
exit while
else if msg.isListItemFocused() then
print "isListItemFocused"
else if msg.isListItemSelected() then
print "isListItemSelected -";msg.GetIndex()
roLS.Close()
end if
else
print "Event: ";type(msg)
print msg.GetInfo()
end if
end while
print "Exiting app"
screenFacade.showMessage("")
sleep(25)
End Sub
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.