Your Digital Media Has Never Looked So Good

 
vrihlea
Topic Author
Posts: 9
Joined: Tue Apr 04, 2017 11:34 pm

CreateNextPanel manually

Wed Sep 06, 2017 8:27 am

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 ?
 
joetesta
Posts: 587
Joined: Wed Apr 20, 2011 11:48 am

Re: CreateNextPanel manually

Wed Sep 06, 2017 8:30 am

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
 
vrihlea
Topic Author
Posts: 9
Joined: Tue Apr 04, 2017 11:34 pm

Re: CreateNextPanel manually

Wed Sep 06, 2017 8:54 am

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")


flower you, DUSKYscript!!!
 
joetesta
Posts: 587
Joined: Wed Apr 20, 2011 11:48 am

Re: CreateNextPanel manually

Wed Sep 06, 2017 8:57 am

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
 
vrihlea
Topic Author
Posts: 9
Joined: Tue Apr 04, 2017 11:34 pm

Re: CreateNextPanel manually

Wed Sep 06, 2017 9:03 am

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

Who is online

Users browsing this forum: No registered users and 3 guests