Titanium Community Questions & Answer Archive

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


It seems that the "cancel" property for AlertDialog does not work. Here is my code:

if (network.online == false) {
    Ti.UI.createAlertDialog({title:'No Cellular Data Network', message:'Please connect to a cellular data network.', buttonNames:['Hide', 'Close'], cancel:1}).show();

"Hide" is darker, when "Close" should be. I guess I could just switch the names around, but I rather the "Hide" on the left side…

— asked September 6th 2010 by Colton Arabsky
  • alertdialog

2 Answers

  • I just hit this same thing. It works on android, returning a true or false for e.cancel, but on the iphone e.cancel always returns the digit 1. So instead I used e.index and just kept track of which was cancel myself (index counts from 0)

    — answered June 22nd 2011 by Steve Hovey
    1 Comment
    • Yes, this is what I do as well. But this is more for the developers to fix their SDK than for my own code.

      — commented June 26th 2011 by Colton Arabsky
  • Bump!

    — answered September 6th 2010 by Colton Arabsky
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.