Monitor Directory for Changes
Look at inotify. With inotify you can watch a directory for file creation.
Look at inotify. With inotify you can watch a directory for file creation.
Its a little tricky. If you set onTouchListener you need to return true in ACTION_DOWN, to tell the system that I have consumed the event and it won’t trickle down to other listeners. But then OnClickListener won’t be fired. So you might think, I will just do my thing there and return false so I … Read more
You need to wrap the assignment of the event listener in a closure, something like: var td; for (var t = 1; t < 8; t++){ td = document.getElementById(‘td’+t); if (typeof window.addEventListener === ‘function’){ (function (_td) { td.addEventListener(‘click’, function(){ console.log(_td); }); })(td); } }