[BUG] optiondialog event's cancel broken
The docs say e.cancel is a boolean indicating if cancel was pressed. On iPhone, cancel is actually set to the index of the cancel button. On the Android, it seems to be completely undefined.
3 Answers
-
I have the same issue. On iPhone I always receive the same value as used as 'cancel' param in createOptionDialog. If I do not pass the 'cancel' param I receive always -1 in the event.
On Android the behavior is like documented, I think. True if cancel was pressed in the event.
-
Working with iOS on SDK 1.8.0.1, I'm getting the same behavior from alert dialogs.
The event's cancel value is the int it was originally set to in createAlertDialog.
-
Complete Solution provided here.
http://developer.appcelerator.com/question/87471/alertdialog-actions