calvaryftl
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2012
09:16 AM
roTextScreen button problem
I just created a TextScreen component with one button. The screen works fine, but the button cannot be accessed. The 4-way pad on the remote does nothing. The button is not active. Can anyone see any problems with my code?
Thanks - Kenny
Thanks - Kenny
screen = CreateObject("roTextScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
details = aFunction(FN)
screen.SetText(details.description)
screen.AddButton(1, "Back")
screen.show()
dialog.Close()
while (true)
msg = wait(0, port)
if type(msg) = "roTextScreenEvent"
if msg.isScreenClosed()
exit while
else if msg.isButtonPressed()
exit while
endif
endif
end while
screen.Close()
6 REPLIES 6

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2012
10:34 AM
Re: roTextScreen button problem
Are you sure it's not crashing? Your code calls "dialog.Close()", but I don't see where you created "dialog".
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
calvaryftl
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2012
10:59 AM
Re: roTextScreen button problem
Oops. That line should not be there - I removed the dialog code when I posted here, just for clarity...


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2012
12:26 PM
Re: roTextScreen button problem
This looks like a bug. If your text is not long enough to make the vertical scrollbar appear, pressing DOWN won't focus the button. Pressing OK does focus the button, but that's not very intuitive. I'll make sure the right people are aware of the problem.
As a workaround, if your text is fairly short you might be able to use a roParagraphScreen instead.
As a workaround, if your text is fairly short you might be able to use a roParagraphScreen instead.
calvaryftl
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2012
01:07 PM
Re: roTextScreen button problem
Thanks for jumping in Chris. I'm using the textScreen because I don't know how long the text will be as it comes out of the database. It varies each day. I guess I can just eliminate the button for now. Most people should know to hit the back button anyway.
Kenny
Kenny

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2012
01:11 PM
Re: roTextScreen button problem
You could also add some carriage returns to the end of the text to ensure it's longer than the dialog box. I'd probably suggest not getting rid of the button. I don't know who your target audience is, but based on experience, if exiting a screen is not obvious, some percentage of your user base will get confused.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
calvaryftl
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2012
10:56 AM
Re: roTextScreen button problem
I just noticed your reply to this thread Endless. Thank you for the suggestion. I think I did that already. Either that or perhaps the 4.9 firmware fixed that bug. It's not happening on any of my screens now.