When I first started playing with the Alert control, this tripped me up for a couple minutes. When trying to override the default text on the Alert control’s buttons, you need to set the
Alert.cancelLabel
, Alert.noLabel
, Alert.okLabel
, and/or Alert.yesLabel
static properties *before* calling the Alert.show()
. Sure, sounds a bit obvious in hindsight, but it is also important to remember that since those values are static, they apply to all Alerts, not just the one specific Alert. So you may have to reset the values back to their defaults once the Alert has been displayed.Full code after the jump.
(more…)
No comments:
Post a Comment
Your comments is appreciate.