Forum Discussion
Trader5050
10 years agoNewbie
Nevermind, fixed!
I had to change it to a function, for whatever reason. I did make a few other minor modifications so I can't say for sure that's what did it, but here's the code:
I had to change it to a function, for whatever reason. I did make a few other minor modifications so I can't say for sure that's what did it, but here's the code:
Function showOKDialog(title = "NOTE" as String,message = "Press OK to continue" as String,buttonText = "OK" as String) as Void
port = CreateObject("roMessagePort")
dialog = CreateObject("roMessageDialog")
dialog.SetMessagePort(port)
dialog.SetTitle(title)
dialog.SetText(message)
dialog.AddButton(1, buttonText)
dialog.EnableBackButton(true)
dialog.Show()
While True
dlgMsg = wait(0, dialog.GetMessagePort())
If type(dlgMsg) = "roMessageDialogEvent"
If dlgMsg.isButtonPressed()
If dlgMsg.GetIndex() = 1
exit while
End If
Else If dlgMsg.isScreenClosed()
exit while
End If
End If
End While
End Function