Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18681

Re: Setting focus

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> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
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+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Subject Re: Setting focus
Newsgroups comp.lang.javascript
References <gkbvi8t9r9n3gob0gm3tiofn8rbif8naa9@4ax.com> <2471865.AAA9jsC1C5@PointedEars.de> <2fhvi8djf47mg171ogdejn3akiam4s10ds@4ax.com> <2754930.5lBmWyc64D@PointedEars.de> <kgokv7$du5$1@speranza.aioe.org> <XnsA175F03EDDEB5eejj99@194.109.133.133> <kgpko7$iq0$1@speranza.aioe.org>
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<OcfhCO[GGYUYI]Zj9^DZm8W4\YJN\b@mF9jNikdUWWB88<dh9WU77j[LgCH64W
X-Complaints-To usenet-abuse@arcor.de
Xref csiph.com comp.lang.javascript:18681

Show key headers only | View raw


Cezary Tomczyk wrote:

> 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.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Setting focus Tim Slattery <Slattery_T@bls.gov> - 2013-02-28 14:30 -0500
  Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-28 20:50 +0100
    Re: Setting focus Tim Slattery <Slattery_T@bls.gov> - 2013-02-28 16:05 -0500
      Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-28 22:17 +0100
        Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-02-28 23:16 +0100
          Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-28 23:36 +0100
            Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-01 08:21 +0100
              Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-01 13:10 +0100
          Re: Setting focus "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-28 23:37 +0100
            Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-01 08:18 +0100
              Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-01 13:12 +0100
                Re: Setting focus Bernd Nawothnig <Bernd.Nawothnig@t-online.de> - 2013-03-02 15:16 +0100
        Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-21 20:06 -0700
          Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-22 10:03 +0100
            Re: Setting focus Tim Slattery <Slattery_T@bls.gov> - 2013-03-22 08:53 -0400
              Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-23 15:09 +0100
            Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-23 15:07 +0100
              Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-24 12:38 +0100
                Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-24 13:42 +0100
                Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-24 13:54 +0100
          Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-23 15:04 +0100
            Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-23 17:35 -0700
              Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-24 10:41 +0100
                Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-24 16:42 -0700
                Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-30 14:27 +0100
                Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-30 09:25 -0700
                Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-30 19:50 +0100
                Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-30 17:11 -0700
              Re: Setting focus Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-03-30 01:02 +0100
                Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-30 09:17 -0700
                Re: Setting focus "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-03-30 17:55 +0100

csiph-web