Oops. I just copied and modified the code you posted earlier. The problem is that that code assigns the variable "dlgMsg" but checks "msg". Try this instead.
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
msg = wait(0, dialog.GetMessagePort())
if type(msg) = "roMessageDialogEvent" then
if msg.isScreenClosed() then
exit while
else if msg.isButtonPressed() then
' This assumes you only have one button and you want it
' to close the dialog when selected, otherwise check
' msg.GetIndex() and respond appropriately
dialog.Close()
end if
end if
end while
End Function
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)