Hi,
I have opened options dialog and trying to open the Help in another dialog by closing the options dialog but it is not working, it makes the roku to restart
My code
function onKeyEvent(key as String, press as Boolean) as Boolean
if key="options"
dialog = createObject("roSGNode", "Dialog")
dialog.title = "Options"
dialog.buttons = ["Help","Feedback","Terms of Use","Privacy Policy","Sign In/Sign Out"]
dialog.observeField("buttonSelected","onbuttonClick")
dialog.optionsDialog = true
m.top.dialog = dialog
end if
end function
sub onbuttonClick()
print m.top.dialog.buttonSelected
if m.top.dialog.buttonSelected = 0
adialog = createObject("roSGNode", "Dialog")
adialog.title = "HELP"
adialog.message = "Kindly visit the following URL http://www.xyz.com"
adialog.optionsDialog = true
m.top.dialog = adialog
end if
end sub
any idea why the roku closes automatically and restarts?