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: 
joetesta
Level 10

things eaten

PosterGrid eats FF and RW clicks, is there a way to intercept them before posterGrid skips ahead?
Screen Saver eats the poster grid or grid panel, what's up with that?
aspiring
0 Kudos
8 Replies
Roku Employee
Roku Employee

Re: things eaten

"joetesta" wrote:
PosterGrid eats FF and RW clicks, is there a way to intercept them before posterGrid skips ahead?

Sure, add a node as child to said poster grid, set focus on it and thus get fist dibs on the input events, leave the rest to the grid.

Screen Saver eats the poster grid or grid panel, what's up with that?

No clue what this means
0 Kudos
joetesta
Level 10

Re: things eaten

"RokuNB" wrote:
"joetesta" wrote:
PosterGrid eats FF and RW clicks, is there a way to intercept them before posterGrid skips ahead?

Sure, add a node as child to said poster grid, set focus on it and thus get fist dibs on the input events, leave the rest to the grid.

Screen Saver eats the poster grid or grid panel, what's up with that?

No clue what this means

Thanks for your reply!
In an app with a posterGrid (inside OverHangPanelSetScene, if that matters), leave a screen up until the default device screensaver appears.  Press a button to come out of the screensaver and the Grid that was onscreen has vanished!  You can navigate around but until a new Grid gets drawn that sucker is gone.  Hope it tasted good, screensaver.
Edit: this guy had the same or similar problem https://forums.roku.com/viewtopic.php?f=34&t=103883&p=564177
aspiring
0 Kudos
Roku Employee
Roku Employee

Re: things eaten

firmware#?
7.6, 7.7?
0 Kudos
joetesta
Level 10

Re: things eaten

"RokuNB" wrote:
firmware#?
7.6, 7.7?

99% sure I saw it both before and after the firmware update (certainly before), on Roku 3. 
I will check to be sure when I'm back where I have that app.
aspiring
0 Kudos
Highlighted
joetesta
Level 10

Re: things eaten

It's happening on 7.7 on both R3 and Ultra.
Here's something interesting, the grid doesn't get eaten if it's on the right and not yet in focus in a "narrow | wide" panelset but it does get eaten consistently if it's on the left and in focus with " wide | narrow" panels 2 & 3 on screen.  If I have time later I'll try to dig into this and see if I can get it to happen in an example app or if there's something specific (and likely wrong) I'm doing in here that's leading to this bug.
aspiring
0 Kudos
Roku Employee
Roku Employee

Re: things eaten

"joetesta" wrote:
...  If I have time later I'll try to dig into this and see if I can get it to happen in an example app or if there's something specific (and likely wrong) I'm doing in here that's leading to this bug.

Yes, can you please write a minimal code sample that demonstrates this, so it can be attached to a bug report, for us to test with different builds? Like "whatever it takes" to get the grid empty (and staying empty) after a screensaver - and if it's reproducible 100% of the time, even better!
0 Kudos
joetesta
Level 10

Re: things eaten

figured it out!  What's happening is that when the screensaver shuts off (not turns on, interestingly), for some reason the first panel's 'itemUnfocused' observer is triggered, which, having followed the manual, hides my grid.

m.listpanel.list.observeField("itemUnfocused", "hidePosterPanel")


https://sdkdocs.roku.com/display/sdkdoc/PanelSet
If any panel contains a list or grid, the typical usage is that when the list or grid panel is on the left, each list/grid item creates a different panel on the right. Typically, the list or grid itemUnfocused and itemFocused fields are observed. When the itemUnfocused field changes, the list or grid panel will hide the panel on the right, then when the itemFocused field changes, it will create a new panel for the newly focused list or grid item, and call replaceChild() to cause the old panel to be replaced by the new one.


Having switched over to 'createNextPanelIndex' instead of itemFocused and itemunFocused, I can shut this observer off.  But this is probably a gotcha for people down the line.
It's weird (and I suppose a bug) because that first panel is already off-screen to the left and to my mind at least, already unfocused.

cheers,
Joe
aspiring
0 Kudos
joetesta
Level 10

Re: things eaten

To follow up, here is a very simple "proof of bug".
Start with https://sdkdocs.roku.com/display/sdkdoc/Sliding+Panels+Markup#SlidingPanelsMarkup-OverhangPanelSetSc... 
OverhangPanelSetSceneExample.zip

Edit overhangpanelsetscene.xml
Add this line to the "setpanels" sub:
m.listpanel.list.observeField("itemunFocused", "hidepanelinfo")


Add this routine to the same xml file:
    sub hidepanelinfo()
? " ------ Eating your panel "
m.gridpanel.visible = false
end sub


Set your system's screen saver time to 1 minute. Side load the app and nav right, wait for the screen saver then key out of it. Bingo. grid eaten.
aspiring
0 Kudos