content: 
  Function showMessageDialog(text as string, title as string) As Void
      port = CreateObject("roMessagePort")
      dialog = CreateObject("roMessageDialog")
      dialog.SetMessagePort(port) 
      dialog.SetTitle(title)
      dialog.SetText(text)
   
      dialog.AddButton(0, "OK")
      dialog.EnableBackButton(true)
      dialog.Show()
      While True
          dlgMsg = wait(0, dialog.GetMessagePort())
          If type(dlgMsg) = "roMessageDialogEvent"
              if dlgMsg.isButtonPressed()
                  if dlgMsg.GetIndex() = 0
                      dialog.Close()
                      exit while
                  end if
              else if dlgMsg.isScreenClosed()
                  exit while
              end if
          end if
      end while 
  End Function