Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <10568013.HPcdpVcOZq@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 01 Mar 2013 13:12:46 +0100 User-Agent: KNode/4.8.5 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <2471865.AAA9jsC1C5@PointedEars.de> <2fhvi8djf47mg171ogdejn3akiam4s10ds@4ax.com> <2754930.5lBmWyc64D@PointedEars.de> MIME-Version: 1.0 Lines: 42 NNTP-Posting-Date: 01 Mar 2013 13:12:46 CET NNTP-Posting-Host: 6fdb2054.newsspool3.arcor-online.net X-Trace: DXC=Qg3bdMH:NJSmG86`U=_nC_McF=Q^Z^V3X4Fo<]lROoRQ8kF W dniu 2013-02-28 23:37, Evertjan. pisze: >> Cezary Tomczyk wrote on 28 feb 2013 in comp.lang.javascript: >>> W dniu 2013-02-28 22:17, Thomas 'PointedEars' Lahn pisze: >>> [...] >>>> var t = window.setTimeout(function () { >>>> field.focus(); >>>> window.clearTimeout(t); >>>> field = null; >>>> t = null; >>>> }, 50); >>> >>> Why here is window.clearTimeout(t);? >> >> Not needed, the timeout is cleared on firing. You probably have evidence to back that up. >> There is no need te set the field variable to null. Yes, there is. man Closure >> There is no need te set the t variable to null. Yes, there is. man Reliability >> There is no need to name the setTimeout(), >> if you don't want to prevent firing it, >> so the variable t is not needed at all. Yes, there is. man Repetition > Exactly I think in the same way. That's why I asked. And why you expect a good answer from him of all people? -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.