Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bounce
Level 7

Dialog to another dialog to scrolling text

I've been trying to troubleshoot my brightscript code for a few days now...

I can get a dialog to display, but cannot add another dialog. I figured duplicating the same code would work, but it will not.

         dialog1 = createObject("RoSGNode","Dialog")
        dialog1.title = "Registration Required"
        dialog1.message = "We see you have not registered your device. To provide access to your purchased content, you will need to visit ...     Press * to Continue"
        dialog1.buttons = ["Continue"]
        dialog1.optionsDialog = true
        dialog1.observeField("buttonSelected","phase1response")
        m.top.dialog = dialog1


I have an observe code where I'm trying to do two things... Trigger a Scrollbox with Terms & conditions to agree to, display a yes/no to agree to terms. Then I want to show a panel with the device code to authenticate the roku with a remote server. Anybody have any suggestions, code?

    sub phase1response()
            m.top.dialog.close = true
            'm.top = m.top.findNode("Terms")
            'm.top.visible = true
            'm.top.setFocus(true)
            
            ' m.termspanel = m.top.panelSet.createChild("scrollabletext")
              'm.termspanel.list.observeField("itemFocused","termspanelset")
             'm.termspanel.setFocus(true)
            
             dialog2 = createObject("roSGNode", "Dialog")
             dialog2.title = "Device Code"
             dialog2.message = "Code: ROKU-51U2U2"
             dialog2.buttons = ["Continue"]
               'dialog2.observeField("buttonSelected","phase2reponse")
                m.top.dialog = dialog2
        end sub
0 Kudos