adrianc1982
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2016
03:11 PM
LabelList vs roListScreen
Is it me or roListScreen scrolls faster? I mean i click down or up pretty fast and roListScreen flies compared to LabelList
Im also having a problem scene graph when using onKeyEvent while scrolling down or up I doesnt seem to catch the down or up button. Until i reach the end of the list or the top i get the up or down button registered and no, im not using any IF statement thats blocking my keys, in fact im debugging with something like this:
In case you are wondering yes, i had to put an observer to track down the change when i click the down button, when focus changes i can change my text or poster, but the onkeyevent wont detect the down or up keys until i reach the top or end of the list. All the other keys do get catched pretty fast with the onkeyevent.
Can i make the scrolling down faster when i click the down button on the remote controller? Maybe adjust the animation time or something?
Im also having a problem scene graph when using onKeyEvent while scrolling down or up I doesnt seem to catch the down or up button. Until i reach the end of the list or the top i get the up or down button registered and no, im not using any IF statement thats blocking my keys, in fact im debugging with something like this:
sub showcontent()
print "selected"
categorycontent = m.listMenu.content.getChild(m.listMenu.itemFocused)
m.poster.uri = categorycontent.HDPosterUrl
m.labelSeletectedItem.text = categorycontent.title
end sub
function onKeyEvent(key as String, press as Boolean) as Boolean
print "key: "+key
categorycontent = m.listMenu.content.getChild(m.listMenu.itemFocused)
m.poster.uri = categorycontent.HDPosterUrl
m.labelSeletectedItem.text = categorycontent.title
end function
In case you are wondering yes, i had to put an observer to track down the change when i click the down button, when focus changes i can change my text or poster, but the onkeyevent wont detect the down or up keys until i reach the top or end of the list. All the other keys do get catched pretty fast with the onkeyevent.
Can i make the scrolling down faster when i click the down button on the remote controller? Maybe adjust the animation time or something?
4 REPLIES 4

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2016
01:52 PM
Re: LabelList vs roListScreen
"adrianc1982" wrote:
Im also having a problem scene graph when using onKeyEvent while scrolling down or up I doesnt seem to catch the down or up button.
That's the expected behavior with a focused component that handles the keypresses. You get the keypress at the top and bottom of the list to give you the opportunity to change focus. Take a look at Handling Remote Control Key Presses in the documentation for more info.
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)

marcelo_cabral
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2016
06:32 PM
Re: LabelList vs roListScreen
"TheEndless" wrote:"adrianc1982" wrote:
Im also having a problem scene graph when using onKeyEvent while scrolling down or up I doesnt seem to catch the down or up button.
That's the expected behavior with a focused component that handles the keypresses. You get the keypress at the top and bottom of the list to give you the opportunity to change focus. Take a look at Handling Remote Control Key Presses in the documentation for more info.
I was trying the same thing with roListScreen, it seems that Roku do not generate an event when in the top and key up is pressed and in bottom key down is pressed.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2016
06:58 PM
Re: LabelList vs roListScreen
"marcelo.cabral" wrote:
I was trying the same thing with roListScreen, it seems that Roku do not generate an event when in the top and key up is pressed and in bottom key down is pressed.
Does it not produce "extraneous" isListItemFocused() events when in that position? I.e. receiving getIndex() = 1, 1, 1...
- If it does, you can milk/use that.
- If it does not, you can request the Co to enhance the behavior (but don't hold you breath long, couple of years ago i proposed them add PgUp/PgDn behavior of <</>> for roListScreen and ... still haven't heard back).
adrianc1982
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016
03:48 PM
Re: LabelList vs roListScreen
"TheEndless" wrote:"adrianc1982" wrote:
Im also having a problem scene graph when using onKeyEvent while scrolling down or up I doesnt seem to catch the down or up button.
That's the expected behavior with a focused component that handles the keypresses. You get the keypress at the top and bottom of the list to give you the opportunity to change focus. Take a look at Handling Remote Control Key Presses in the documentation for more info.
Thanks for your kind answer i will study those and come back with a reply. In the past roku development for me at least has been like hacking code I had to get really creative to achieve certain things and now im giving a shot to scene graph reading all the documentation and reading the forums but i think we need to keep posting about this "hacks" and how to get things done.
Expected behavior i get it but you could also just record the key up and down and keep an eye on your last item or first to change focus. Because waiting for showcontent() function is SLOW as fuck.Thanks also for reading my rant.