sub ConfirmSignOUT() As Object
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
scene = screen.CreateScene("ConfirmSignout")
screen.show()
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then
return -1
exit while
end if
end if
end while
End sub
<component name = "ConfirmSignout" extends = "Scene" >
<script type = "text/brightscript" >
<![CDATA[
sub init()
m.top.backgroundURI ="pkg:/images/rsgde_bg_hd.jpg"
dialog = createObject("roSGNode", "Dialog")
'dialog.backgroundUri = "pkg:/images/rsgde_dlg_bg_hd.9.png"
dialog.optionsDialog = false
dialog.title = "Alert"
dialog.message = "Are you sure you want to Signout?"
dialog.buttons=["No","Yes"]
dialog.visible = true
m.top.dialog = dialog
end sub
sub dismissSignoutdialog()
m.top.dialog.close = true
end sub
function onKeyEvent(key as String, press as Boolean) as Boolean
button_val = m.top.dialog.buttonSelected
if not press then
if key = "OK"
if(button_val = 0)
dismissSignoutdialog()
return true
else if (button_val = 1)
print "m.top";m.top
'return true
end if
end if
end if
'return false
end function
]]>
</script>
<children >
<Label
id = "SignoutLable" />
</children>
</component>
"veerareddya" wrote:
I'm not trying to close the application.i just want close the dialog pop-up and focus will be on the previous screen.
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
m.global =screen.getGlobalNode()
m.global.id="GlobalNode"
m.global.addFields({tempmessage:"Are you sure you want to Signout?"})
screen.setMessagePort(m.port)
scene = screen.CreateScene("ConfirmSignout")
screen.show()
sub init()
print m.global.tempmessage
m.top.backgroundURI ="pkg:/images/rsgde_bg_hd.jpg"
dialog = createObject("roSGNode", "Dialog")
dialog.optionsDialog = false
dialog.title = "Alert"
dialog.message = m.global.tempmessage
dialog.buttons=["No","Yes"]
dialog.visible = true
m.top.dialog = dialog
end sub
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!
For support, visit support.roku.com.