360tv
13 years agoStreaming Star
ShowMessageDialog
so if I plop this code from the component reference into my appHomeScreen.brs...
it freezes after it shows up. Button 1 doesn't do anything and I have to exit out of the app entirely. What's going on with that?
My goal is to create sort of a "Message Of The Day" kinda thing. But my first step is to get a simple dialog box to work. Then I'll address how to feed it the information I want (probably thru a separate xml feed).
Function ShowMessageDialog() As Void
port = CreateObject("roMessagePort")
dialog = CreateObject("roMessageDialog")
dialog.SetMessagePort(port)
dialog.SetTitle("[Message dialog title]")
dialog.SetText("[Message dialog text............]")
dialog.AddButton(1, "[button text]")
dialog.Show()
while true
dlgMsg = wait(0, dialog.GetMessagePort())
if type(dlgMsg) = "roMessageDialogEvent"
if msg.isScreenClosed()
exit while
end if
end if
end while
End Function
it freezes after it shows up. Button 1 doesn't do anything and I have to exit out of the app entirely. What's going on with that?
My goal is to create sort of a "Message Of The Day" kinda thing. But my first step is to get a simple dialog box to work. Then I'll address how to feed it the information I want (probably thru a separate xml feed).