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

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 4
joetesta
Roku Guru

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
Visitor

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
Roku Guru

Re: CreateNextPanel manually

yeah i accepted some screen flicker as the least of several evils 😉
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
Visitor

Re: CreateNextPanel manually

thanks, will have to rethink stuff to make it play along somehow
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.