Skip to content

Instantly share code, notes, and snippets.

@geecu
Created March 27, 2010 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geecu/346334 to your computer and use it in GitHub Desktop.
Save geecu/346334 to your computer and use it in GitHub Desktop.
var t = setTimeout(function()
{
var alert = Titanium.UI.createAlertDialog(
{
title: 'Timeout fired!',
message: ''
}
);
alert.show();
}, 1000000);
var b = Ti.UI.createButton(
{
title:'Trigger it!',
width: 200,
height: 40
}
);
b.addEventListener('click', function()
{
clearTimeout(t);
}
);
var win1 = Titanium.UI.createWindow();
win1.add(b);
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment