Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
hugetv
Level 7

while assistance

example I have

Function Example()
port = CreateObject("roMessagePort")
grid = CreateObject("roGridScreen")
grid.SetMessagePort(port)
rowTitles = CreateObject("roArray", 10, true)
for j = 0 to 10
rowTitles.Push("[Row Title " + j.toStr() + " ] ")
end for
grid.SetupLists(rowTitles.Count())
grid.SetListNames(rowTitles)
for j = 0 to 10
list = CreateObject("roArray", 10, true)
for i = 0 to 10
o = CreateObject("roAssociativeArray")
o.ContentType = "episode"
o.Title = "[Title" + i.toStr() + "]"
o.ShortDescriptionLine1 = "[ShortDescriptionLine1]"
o.ShortDescriptionLine2 = "[ShortDescriptionLine2]"
list.Push(o)
end for
grid.SetContentList(j, list)
end for
grid.Show()
while true
msg = wait(0, port)
if type(msg) = "roGridScreenEvent" then
if msg.isScreenClosed() then
return -1
elseif msg.isListItemFocused()
print "Focused msg: ";msg.GetMessage();"row: ";msg.GetIndex();
print " col: ";msg.GetData()
elseif msg.isListItemSelected()
print "Selected msg: ";msg.GetMessage();"row: ";msg.GetIndex();
print " col: ";msg.GetData()
Example()
endif
endif
end while
End Function


in the same function comes several times and give back to stay open while
Our system http://www.rokumanager.com
0 Kudos
2 Replies
hugetv
Level 7

Re: while assistance

I have problem when exiting the Canvas channel it remains open and can not leave the channel can do
Our system http://www.rokumanager.com
0 Kudos
hugetv
Level 7

Re: while assistance

Unexpected event type: 1
Our system http://www.rokumanager.com
0 Kudos