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


Groups > comp.lang.javascript > #29950

Re: Wait on keyboard

Path csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Aleksandro <aleksandro@gmx.com>
Newsgroups comp.lang.javascript
Subject Re: Wait on keyboard
Date Sat, 12 Mar 2016 21:07:32 -0300
Organization A noiseless patient Spider
Lines 119
Message-ID <nc2aq9$boh$1@dont-email.me> (permalink)
References <6ef267d6-7655-4699-9363-d6e0f613f899@googlegroups.com> <nbuq32$gg0$1@news.albasani.net> <nbuqnf$h5u$1@news.albasani.net> <ec9a24dc-6b47-441f-85c3-bb868695c2f1@googlegroups.com> <nbv66u$ko5$1@dont-email.me> <b4240f95-40ec-4bee-ad9a-1cc4fe15273f@googlegroups.com> <167d4204-d421-4852-ab16-b6659b83cfac@googlegroups.com> <re58ebtpclu82quc4thn4uglg7jp4ps48o@4ax.com> <cfd163f7-dc45-4cf1-b8cb-9f1b0b6c4993@googlegroups.com> <XnsA5C99C64E1C14eejj99@194.109.6.166> <35b92d72-d65a-4866-b060-7b448d24d4f1@googlegroups.com> <516a9322-9783-40e9-a512-795e86df76c8@googlegroups.com> <nc27q5$ca5$1@dont-email.me> <0a74df98-79bd-4e03-bfa1-dcbe81739ef9@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Date Sun, 13 Mar 2016 00:04:25 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="10ff5083027c7d1fb29108c9b27f70f4"; logging-data="12049"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Glkm9xLAsYCVI8vMo3SsXFaggjMrdfLg="
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
In-Reply-To <0a74df98-79bd-4e03-bfa1-dcbe81739ef9@googlegroups.com>
Cancel-Lock sha1:rIJFUG0KdEC+8vQo2Hu/HvW8uMk=
Xref csiph.com comp.lang.javascript:29950

Show key headers only | View raw


On 12/03/16 20:57, jonas.thornvall@gmail.com wrote:
> Den söndag 13 mars 2016 kl. 00:16:22 UTC+1 skrev Aleksandro:
>> On 12/03/16 14:25, jonas.thornvall@gmail.com wrote:
>>> Den lördag 12 mars 2016 kl. 16:47:11 UTC+1 skrev jonas.t...@gmail.com:
>>>> Den lördag 12 mars 2016 kl. 15:23:04 UTC+1 skrev Evertjan.:
>>>>> jonas.thornvall@gmail.com wrote on 12 Mar 2016 in comp.lang.javascript:
>>>>>
>>>>>> And you know as well as i
>>>>>
>>>>> So you are an expert on the knowledge of others?
>>>>>
>>>>> I even doubt you yourself know what you know.
>>>>> That would explain why you need to answer yourself in those long monologues.
>>>>>
>>>>>> that you can't run the same type of code using
>>>>>> a JS serverside scripts as the clientside web browser script.  It is
>>>>>> another type of interpreter, they are not equivalent. 
>>>>>
>>>>> Nonsense.
>>>>>
>>>>> var a = 3 * 4;
>>>>>
>>>>> runs exactly the same on serverside execution as on clientside execution.
>>>>>
>>>>> The IE-Javascript engine and the ASP-Jscript engine have been exactly the 
>>>>> same, except for the interface. The browser-engines of different browsers 
>>>>> are different, but all have an interface to the DOM, the server-engine has 
>>>>> no DOM interface. 
>>>>>
>>>>> Usually there is no one around at the server to use a keyboard or look at a 
>>>>> screen anyway. Many servers run hundreds of websites, so would need hundreds 
>>>>> of keyboeard/screen/operators working around the clock.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Evertjan.
>>>>> The Netherlands.
>>>>> (Please change the x'es to dots in my emailaddress)
>>>>
>>>> Oh gosh how stupid of me to think that keypress belonged to the UI, because that was what John Harris was talking about.
>>>>
>>>> Timer of course don't but i can not really see why ***wait***  and ***keypress*** could not be part of the UI interface.
>>>>
>>>> wait (mouseDown)
>>>> wait (keyPress=="32")
>>>>
>>>> And i do not really see why something like
>>>>
>>>> if (keyPress=="32") dosomething();
>>>>
>>>> Can't be allowed i can only see benefits from a simplified approach of eventhandling. It is not different from setting a range for mouse driven function call.
>>>>
>>>> if (mouseDown.x >= arr[t].rposX && mouseDown.x <= (arr[t].rposX + arr[t].rwidth) && mouseDown.y >= arr[t].rposY && mouseDown.y <= (arr[t].rposY + arr[t].rheigth))dosomething()
>>>>
>>>> But you can see the difference in labour effort doing the function call.
>>>>
>>>> And you could achieve alot of things like maka a real good texteditor or any other UI application that use keypress shortcuts to perform actions by calling functions. It would be quite another language and allow for different approaches creating UI. Personally i like click drag drop but that doesn't mean that keyboard driven eventhandling should be prohibited or be done with such agony of labour that people simply skip or refuse to use it in their applications.
>>>>
>>>>
>>>>
>>>> Maybe there is a good reason for it not to be allowed or preference of choice, but then i would like to know it.
>>>
>>> Finally found some useful code.
>>>
>>> <head>
>>>     <script type="text/javascript">
>>>         function Init () {
>>>             var counter = document.getElementById ("counter");
>>>             for (var i = 1; i < 1000; i++) {
>>>                 var option = new Option (i, i);
>>>                 counter.options.add (option);
>>>             }
>>>             counter.focus ();
>>>         }
>>>
>>>         function OnKeyPressCounter (event, counter) {
>>>             var chCode = ('charCode' in event) ? event.charCode : event.keyCode;
>>>
>>>             if (chCode == 43 /* + */) {
>>>                 if (counter.selectedIndex < counter.options.length - 1) {
>>>                     counter.selectedIndex++;
>>>                 }
>>>             }
>>>             if (chCode == 45 /* - */) {
>>>                 if (counter.selectedIndex > 0) {
>>>                     counter.selectedIndex--;
>>>                 }
>>>             }
>>>         }
>>>     </script>
>>> </head>
>>> <body onload="Init ()">
>>>     Use the + and - keys to increase/decrease the counter.
>>>     <select id="counter" onkeypress="OnKeyPressCounter (event, this)" style="width:80px"></select>
>>> </body>
>>
>> By judging your excess "self confidence" I thought you would have
>> already figured how to do it by yourself. But now that I read what you
>> call "useful" code I am back to think you are rather clueless about
>> Javascript; that code is quite sloppy.
>>
>> Everything would have been better if you asked nicely but well...
>>
>> My suggestion, attach event listeners correctly from the script, you
>> might want to look on what bubbling is about.
>>
>> If you have more questions, recognize it and ask, if you keep whining
>> like you have done then you better don't even bother asking, really.
> 
> To be honest i have solutions that is far better than you people propose because your approaches really does not make sense. Only hard indoctrination learning howto pile shit can make one go your route. Fortunatly i am not quite there yet i still have a couple of braincells left in me.
> 
> But i must say both your defend of something that so obviously stupid and your quirky fix arounds that really doesn't solve the problem with pore structure annoys me. So i will fix it without even look at your flawed eventhandling, because in the end it is so stupid it is laughable.
> 
> I will write the few lines needed to get my debug.

lol

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


Thread

Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 02:30 -0800
  Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-11 10:37 +0000
  Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 02:50 -0800
    Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:13 -0800
      Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:23 -0800
        Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:32 -0800
          Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 03:39 -0800
            Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 04:41 -0800
              Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 05:00 -0800
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 05:43 -0800
      Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-11 12:13 +0000
  Re: Wait on keyboard "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-11 21:52 +0800
    Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 07:29 -0800
  Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-11 17:00 +0100
    Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-11 17:11 +0100
      Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 08:32 -0800
        Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-11 20:20 +0100
      Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 08:55 -0800
        Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-11 16:30 -0300
          Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 11:46 -0800
            Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:22 -0800
              Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-11 17:25 -0300
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:32 -0800
                Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-11 17:42 -0300
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:52 -0800
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-11 12:47 -0800
                Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:39 -0800
              Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:37 -0800
              Re: Wait on keyboard John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-12 13:16 +0000
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 05:57 -0800
                Re: Wait on keyboard John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-13 10:31 +0000
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 05:55 -0700
                Re: Wait on keyboard "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-13 17:19 +0100
                Re: Wait on keyboard Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-13 13:01 -0700
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 15:19 -0700
                Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-13 20:08 -0300
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 21:45 -0700
                Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-14 01:50 -0300
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 22:39 -0700
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 22:46 -0700
                Re: Wait on keyboard Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-14 11:54 -0700
                Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-14 08:31 +0000
                Re: Wait on keyboard John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-14 10:43 +0000
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 06:04 -0800
                Re: Wait on keyboard "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-12 15:22 +0100
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 07:46 -0800
                Re: Wait on keyboard Tim Streater <timstreater@greenbee.net> - 2016-03-12 15:52 +0000
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 09:25 -0800
                Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-12 20:16 -0300
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 15:57 -0800
                Re: Wait on keyboard Aleksandro <aleksandro@gmx.com> - 2016-03-12 21:07 -0300
                Re: Wait on keyboard Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-12 21:27 -0800
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-13 03:08 -0700
                Re: Wait on keyboard "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-12 23:30 +0100
                Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 06:15 -0800
            Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:33 -0800
              Re: Wait on keyboard jonas.thornvall@gmail.com - 2016-03-12 03:01 -0800
    Re: Wait on keyboard "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-03-11 18:30 -0800
    Re: Wait on keyboard Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-12 04:44 +0100
      Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-12 11:21 +0100
        Re: Wait on keyboard Stefan Weiss <krewecherl@gmail.com> - 2016-03-12 11:27 +0100
        Re: Wait on keyboard Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-12 14:44 +0100
    Re: Wait on keyboard "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-03-14 18:58 +0800

csiph-web