This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({ | |
backgroundColor: 'white' | |
}); | |
win.addEventListener('click', function foo(e) { // note the named function expression needed for the second way | |
// oringal idea by @fukhaos | |
// http://www.tidev.io/2014/09/10/the-case-against-ti-app-fireevent-2/#comment-13013 | |
e.source.removeEventListener(e.type, arguments.callee); | |