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

CreateNextPanel manually

Is it possible to create a "nextPanel" without 
m.top.ObserveField("createNextPanelIndex", "createNextPanel")


I tried setting it manually with
m.top.hasNext = true
m.top.nextPanel = CreateObject...
m.top.nextPanel.SetFocus(true)


adding it to the PanelSet with AppendChild also doesn't work (https://sdkdocs.roku.com/display/sdkdoc/PanelSet)


are there other ways to hack this ?
0 Kudos
4 Replies
joetesta
Level 10

Re: CreateNextPanel manually

I faced this issue a couple weeks ago and eventually came onto the solution to replace the contents of each node in the nextPanel.  I found I could not replace the nodes directly because the reference will persist to the previous node.  I had to keep the same nodes in place and just update their contents (text and uri's).  Hope this helps, it was a PITA!!!
-Joe
aspiring
0 Kudos
vrihlea
Level 7

Re: CreateNextPanel manually

yes, I thought about reusing the panel, but the issue now is the next panel flickers when going up-down the list... even if I unobserve the createNextPanel event with:
sub createNextPanel(event as Object)
m.top.UnobserveField("createNextPanelIndex")


damn you, DUSKYscript!!!
0 Kudos
joetesta
Level 10

Re: CreateNextPanel manually

yeah i accepted some screen flicker as the least of several evils Smiley Wink
If you're replacing the contents you'll either need to hide the panel during that update or accept it, I'm afraid.
aspiring
0 Kudos
vrihlea
Level 7

Re: CreateNextPanel manually

thanks, will have to rethink stuff to make it play along somehow
0 Kudos