Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

[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.

— asked May 5th 2010 by Damien Elmes
  • android
  • bug
  • iphone
  • optiondialog
0 Comments

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.

    — answered July 1st 2010 by Jicks Steen
    permalink
    0 Comments
  • 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

    — answered February 29th 2012 by AvtarSingh Suchariya
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.