The documentation states, "The prompt dialog returns a string
that the user enters when they press OK
, and null
when they press Cancel."
However I've discovered that null is returned when the user clicks cancel, and also when they click OK without entering anything. So I can't tell whether they clicked OK or cancel. If they click OK without entering anything, that's not valid in my scenario but I can't tell whether to validate it because maybe they clicked cancel.
Any way to determine which button was clicked?