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: 
lbell
Level 7

Problems with text screen

I've been trying to put a large amount of readable text on a channel I'm working on but every time I try to load the text it just locks up the roku box.
Any thoughts as to why this is?
I'm trying to load about 500 kilobytes of text using the rotextscreen component.
Here's the code.
Function showTextScreen(Selection As Object) As Integer
initTheme()
port = CreatObject("roMessagePort")
screen = CreateObject("roTextScreen")
screen.SetMessagePort(Port)
screen.SetTittle("Bible Lessons")
screen.SetHeaderText(Selection.Tittle)
screen.SetText(Selection.Synopsis)
screen.AddButton(1,"Close")
screen.Show()
while true
msg = wait(0, screen.GetMessagePort())
if type(msg) = " roTextScreenEvent"
if msg.isScreenClosed() then
return -1
elseif msg.isButtonPressed() then
if msg.GetIndex() = 1 then
return -1
endif
endif
endif
end while
End Function


0 Kudos
3 Replies
RokuMarkn
Level 7

Re: Problems with text screen

Do you have the debugger open when you run your app? I suspect the debugger will tell you that your first call to CreateObject is misspelled. SetTitle later on is also misspelled.

--Mark
0 Kudos
EnTerr
Level 8

Re: Problems with text screen

This
"lbell" wrote:

...
port = CreatObject("roMessagePort")
...
screen.SetTittle("Bible Lessons")
...
if type(msg) = " roTextScreenEvent"

But yeah, keep an eye on teh console - only the last one wouldn't've showed.
0 Kudos
Highlighted
lbell
Level 7

Re: Problems with text screen

Oh...that's embarrassing Smiley Tongue
I don't even have a roku..my friend debugged it and I'm not sure if he checked but I'm almost positive the misspellings are the problem.

Thanks!
0 Kudos