Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
adrianc1982
Visitor

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:


    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?
0 Kudos
4 REPLIES 4
TheEndless
Channel Surfer

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)
0 Kudos
marcelo_cabral
Roku Guru

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.
0 Kudos
EnTerr
Roku Guru

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).
0 Kudos
adrianc1982
Visitor

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.
0 Kudos