IE Error "Stop Running This Script"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Mark

    #16
    Re: IE Error "Stop Running This Script"

    On Oct 23, 3:05 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
    wrote:
    David Mark wrote:
    "Rik Wasmus" wrote:
    Thomas 'PointedEars' Lahn wrote:
    >David Mark wrote:
    >>Thomas 'PointedEars' Lahn wrote:
    >>>David Mark wrote:
    >>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
    >>>>>[...]
    >>>>>If your script really has to work for a very long time, you could 
    >>>>>split
    >>>>>up execution into smaller parts. For example, if you're doing protein
    >>>>>folding calculations, or raytracing, or meteorological simulations  
    >>>>>with
    >>>>>javascri pt in a browser[0], you could run $n iterations, then call
    >>>>>setTimeout ("continueCalcu lations()", delay-in-ms) to do the next $n
    [unquoted]
    David: Eval is Evil
    Thomas: What has that got to do with it?
    [/unquote]
    >
    >>You don't see that?
    >See what?
    Aside from the fact he should indeed have quoted the posts in between:
    >
    'setTimeout("co ntinueCalculati ons()",deal-in-ms)'
    >
    vs.
    >
    'setTimeout(con tinueCalculatio ns,deal-in-ms)'
    >
    Thank you Rik.  And yes, as Thomas was sure to point out, I mis-quoted
    one of the responses.  And he knew what I was talking about all
    along.
    >
    No, you don't.  eval() does not even enter into it.
    I don't what? And what do you think happens to that string?
    >
    [snip]
    speaking, the string value is even more compatible than the Function
    reference as the first argument.
    Gee, no kidding? More compatible? Perhaps your memory is not what it
    used to be, if you feel the need to enlighten me about such things.

    Regardless, it is stupid to use it unless you need to support some
    truly ancient browsers. I myself use it in gateway code, but nowhere
    else.

    And quite frankly, I'll point out what I like. Whether you consider
    it a mistake or not is irrelevant (as always.)

    Comment

    • Jorge

      #17
      Re: IE Error &quot;Stop Running This Script&quot;

      On Oct 24, 1:35 am, David Mark <dmark.cins...@ gmail.comwrote:
      On Oct 23, 3:05 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
      wrote:
      >
      >
      >
      >
      >
      David Mark wrote:
      "Rik Wasmus" wrote:
      >Thomas 'PointedEars' Lahn wrote:
      >>David Mark wrote:
      >>>Thomas 'PointedEars' Lahn wrote:
      >>>>David Mark wrote:
      >>>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
      >>>>>>[...]
      >>>>>>If your script really has to work for a very long time, you could  
      >>>>>>split
      >>>>>>up execution into smaller parts. For example, if you're doing protein
      >>>>>>folding calculations, or raytracing, or meteorological simulations  
      >>>>>>with
      >>>>>>javascrip t in a browser[0], you could run $n iterations, then call
      >>>>>>setTimeou t("continueCalc ulations()", delay-in-ms) to do the next $n
      >[unquoted]
      >David: Eval is Evil
      >Thomas: What has that got to do with it?
      >[/unquote]
      >
      >>>You don't see that?
      >>See what?
      >Aside from the fact he should indeed have quoted the posts in between:
      >
      >'setTimeout("c ontinueCalculat ions()",deal-in-ms)'
      >
      >vs.
      >
      >'setTimeout(co ntinueCalculati ons,deal-in-ms)'
      >
      Thank you Rik.  And yes, as Thomas was sure to point out, I mis-quoted
      one of the responses.  And he knew what I was talking about all
      along.
      >
      No, you don't.  eval() does not even enter into it.
      >
      I don't what?  And what do you think happens to that string?
      >
      It takes as much as 10x longer to call "f()" than to call f in
      FF3+FireBug:



      But in most modern browsers and in nowadays computers the difference
      is negligible (even though it takes 1.5...3x longer) as we're talking
      about tens of µs (not milliseconds).

      OTOH, unlike setTimeout(f, n), ISTM that a problem with the
      setTimeout("f() ", n) form is that "f()" is going to be evaluated in a
      different context than the one in which you set the timeout.

      --
      Jorge.

      --
      Jorge.

      Comment

      • Thomas 'PointedEars' Lahn

        #18
        Re: IE Error &quot;Stop Running This Script&quot;

        Andrew Poulos wrote:
        Thomas 'PointedEars' Lahn wrote:
        >It was an inept attempt at tetrapilotomy, nothing more.
        >
        Its spelt "tetrapylot omy" :-)
        ^ ^
        I don't think so :)


        F'up2 poster

        PointedEars
        --
        var bugRiddenCrashP ronePieceOfJunk = (
        navigator.userA gent.indexOf('M SIE 5') != -1
        && navigator.userA gent.indexOf('M ac') != -1
        ) // Plone, register_functi on.js:16

        Comment

        • John W Kennedy

          #19
          Re: IE Error &quot;Stop Running This Script&quot;

          Thomas 'PointedEars' Lahn wrote:
          Andrew Poulos wrote:
          >Thomas 'PointedEars' Lahn wrote:
          >>It was an inept attempt at tetrapilotomy, nothing more.
          >Its spelt "tetrapylot omy" :-)
          ^ ^
          I don't think so :)
          Well, actually, it's "tetrathrixotom y", but no one listen to poor
          Zathrates. :-)

          --
          John W. Kennedy
          "When a man contemplates forcing his own convictions down another
          man's throat, he is contemplating both an unchristian act and an act of
          treason to the United States."
          -- Joy Davidman, "Smoke on the Mountain"

          Comment

          • Thomas 'PointedEars' Lahn

            #20
            Re: IE Error &quot;Stop Running This Script&quot;

            David Mark wrote:
            Thomas 'PointedEars' Lahn wrote:
            >David Mark wrote:
            >>"Rik Wasmus" wrote:
            >>>Thomas 'PointedEars' Lahn wrote:
            >>>>David Mark wrote:
            >>>>>Thomas 'PointedEars' Lahn wrote:
            >>>>>>David Mark wrote:
            >>>>>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .com>
            >>>>>>>wrote:
            >>>>>>>>[...] If your script really has to work for a very long
            >>>>>>>>time, you could split up execution into smaller parts.
            >>>>>>>>For example, if you're doing protein folding
            >>>>>>>>calcula tions, or raytracing, or meteorological
            >>>>>>>>simulat ions with javascript in a browser[0], you could
            >>>>>>>>run $n iterations, then call
            >>>>>>>>setTime out("continueCa lculations()", delay-in-ms) to do
            >>>>>>>>the next $n
            >>>[unquoted] David: Eval is Evil Thomas: What has that got to do with
            >>>it? [/unquote]
            >>>>>You don't see that?
            >>>>See what?
            >>>Aside from the fact he should indeed have quoted the posts in
            >>>between: 'setTimeout("co ntinueCalculati ons()",deal-in-ms)' vs.
            >>>'setTimeout( continueCalcula tions,deal-in-ms)'
            >>Thank you Rik. And yes, as Thomas was sure to point out, I
            >>mis-quoted one of the responses. And he knew what I was talking
            >>about all along.
            >No, you don't. eval() does not even enter into it.
            >
            I don't what? And what do you think happens to that string?
            It certainly does not get passed to eval(). In any case, the performance
            gain hat could be expected from not using a string value is negligibly small.
            >speaking, the string value is even more compatible than the Function
            >reference as the first argument.
            >
            Gee, no kidding? More compatible?
            Yes, *strictly speaking*. You started splitting hairs here, remember?
            Perhaps your memory is not what it used to be, if you feel the need to
            enlighten me about such things.
            Perhaps you are on a very bad trip. Who knows ...
            Regardless, it is stupid to use it unless you need to support some truly
            ancient browsers. I myself use it in gateway code, but nowhere else.
            You might be correct there. I thought that IE 5.01, which comes with the
            default Windows 2000 setup, was not capable of handling Function object
            references there, but apparently (tested with standalone IE 5.01 on Windows
            XP SP3) it is.
            And quite frankly, I'll point out what I like.
            As do I.
            Whether you consider it a mistake or not is irrelevant (as always.)
            It is not irrelevant if a statement is misleading others into believing that
            they made a *mistake* when it is objectively _not_ so, as it happened here.


            PointedEars
            --
            var bugRiddenCrashP ronePieceOfJunk = (
            navigator.userA gent.indexOf('M SIE 5') != -1
            && navigator.userA gent.indexOf('M ac') != -1
            ) // Plone, register_functi on.js:16

            Comment

            • Thomas 'PointedEars' Lahn

              #21
              Re: IE Error &quot;Stop Running This Script&quot;

              Jorge wrote:
              David Mark wrote:
              >Thomas 'PointedEars' Lahn wrote:
              >>David Mark wrote:
              >>>"Rik Wasmus" wrote:
              >>>>Thomas 'PointedEars' Lahn wrote:
              >>>>>David Mark wrote:
              >>>>>>Thomas 'PointedEars' Lahn wrote:
              >>>>>>>David Mark wrote:
              >>>>>>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
              >>>>>>>>>[...]
              >>>>>>>>>If your script really has to work for a very long time, you could
              >>>>>>>>>spli t
              >>>>>>>>>up execution into smaller parts. For example, if you're doing protein
              >>>>>>>>>foldin g calculations, or raytracing, or meteorological simulations
              >>>>>>>>>with
              >>>>>>>>>javasc ript in a browser[0], you could run $n iterations, then call
              >>>>>>>>>setTim eout("continueC alculations()", delay-in-ms) to do the next $n
              >>>>[unquoted]
              >>>>David: Eval is Evil
              >>>>Thomas: What has that got to do with it?
              >>>>[/unquote]
              >>>>>>You don't see that?
              >>>>>See what?
              >>>>Aside from the fact he should indeed have quoted the posts in between:
              >>>>'setTimeout ("continueCalcu lations()",deal-in-ms)'
              >>>>vs.
              >>>>'setTimeout (continueCalcul ations,deal-in-ms)'
              >>>Thank you Rik. And yes, as Thomas was sure to point out, I mis-quoted
              >>>one of the responses. And he knew what I was talking about all
              >>>along.
              >>No, you don't. eval() does not even enter into it.
              >I don't what? And what do you think happens to that string?
              >
              It takes as much as 10x longer to call "f()" than to call f in
              FF3+FireBug:
              >
              http://jorgechamorro.com/cljs/022/
              Your test case is bogus as timeouts may accumulate if you use 0 as the
              second argument (which is normalized to 10 on 32-bit CPUs).
              But in most modern browsers and in nowadays computers the difference
              is negligible
              Exactly.
              (even though it takes 1.5...3x longer) as we're talking about tens of
              µs (not milliseconds).
              You cannot know that, the timer resolution is just not fine enough.
              OTOH, unlike setTimeout(f, n), ISTM that a problem with the
              setTimeout("f() ", n) form is that "f()" is going to be evaluated in a
              different context than the one in which you set the timeout.
              It isn't.


              PointedEars
              --
              realism: HTML 4.01 Strict
              evangelism: XHTML 1.0 Strict
              madness: XHTML 1.1 as application/xhtml+xml
              -- Bjoern Hoehrmann

              Comment

              • sasuke

                #22
                Re: IE Error &quot;Stop Running This Script&quot;

                On Oct 24, 7:08 am, Jorge <jo...@jorgecha morro.comwrote:
                OTOH, unlike setTimeout(f, n), ISTM that a problem with the
                setTimeout("f() ", n) form is that "f()" is going to be evaluated in a
                different context than the one in which you set the timeout.
                More specifically, always in the context of the global window object.

                ----------------------------------
                <script type="text/javascript">
                function b() {
                alert("inside b()");
                }

                window.onload = function() {
                function a() {
                alert("inside a() of onload");
                }
                setTimeout("b() ", 100); // works
                setTimeout("a() ", 100); // a() not defined
                }
                </script>
                ----------------------------------

                /sasuke

                Comment

                • Thomas 'PointedEars' Lahn

                  #23
                  Re: IE Error &quot;Stop Running This Script&quot;

                  sasuke wrote:
                  Jorge wrote:
                  >OTOH, unlike setTimeout(f, n), ISTM that a problem with the
                  >setTimeout("f( )", n) form is that "f()" is going to be evaluated in a
                  >different context than the one in which you set the timeout.
                  >
                  More specifically, always in the context of the global window object.
                  s/global//

                  However, that is _not_ different with a Function object reference. What is
                  different is that the Function object reference as an argument *may* refer
                  to another object than the same identifier in a string literal.


                  PointedEars
                  --
                  realism: HTML 4.01 Strict
                  evangelism: XHTML 1.0 Strict
                  madness: XHTML 1.1 as application/xhtml+xml
                  -- Bjoern Hoehrmann

                  Comment

                  • Andrew Poulos

                    #24
                    Re: IE Error &quot;Stop Running This Script&quot;

                    Thomas 'PointedEars' Lahn wrote:
                    Andrew Poulos wrote:
                    >Thomas 'PointedEars' Lahn wrote:
                    >>It was an inept attempt at tetrapilotomy, nothing more.
                    >Its spelt "tetrapylot omy" :-)
                    ^ ^
                    I don't think so :)
                    You're right I should've written "tetrapyloctomy ".
                    <url: http://www.answers.com/topic/tetrapyloctomy >
                    Unless you mean some other word.

                    Andrew Poulos

                    Comment

                    • sasuke

                      #25
                      Re: IE Error &quot;Stop Running This Script&quot;

                      On Oct 25, 12:01 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                      wrote:
                      sasuke wrote:
                      Jorge wrote:
                      OTOH, unlike setTimeout(f, n), ISTM that a problem with the
                      setTimeout("f() ", n) form is that "f()" is going to be evaluated in a
                      different context than the one in which you set the timeout.
                      >
                      More specifically, always in the context of the global window object.
                      >
                      s/global//
                      >
                      However, that is _not_ different with a Function object reference.
                      It seems to be different with the Function Object reference given that
                      the reference is resolved in current context rather than the global
                      context.

                      ------------------------------------------------
                      <script type="text/javascript">
                      function b() {
                      alert("inside b() of the global context");
                      }
                      window.onload = function() {
                      function b() {
                      alert("Inside b() of onload");
                      }
                      function a() {
                      alert("inside a() of onload");
                      }
                      setTimeout("b() ", 2000);
                      setTimeout(b, 1000);
                      }
                      </script>
                      ------------------------------------------------

                      /sasuke

                      Comment

                      • Thomas 'PointedEars' Lahn

                        #26
                        Re: IE Error &quot;Stop Running This Script&quot;

                        sasuke wrote:
                        Thomas 'PointedEars' Lahn wrote:
                        >sasuke wrote:
                        >>Jorge wrote:
                        >>>OTOH, unlike setTimeout(f, n), ISTM that a problem with the
                        >>>setTimeout(" f()", n) form is that "f()" is going to be evaluated in a
                        >>>different context than the one in which you set the timeout.
                        >>More specifically, always in the context of the global window object.
                        >s/global//
                        >>
                        >However, that is _not_ different with a Function object reference.
                        >
                        It seems to be different with the Function Object reference given that
                        the reference is resolved in current context rather than the global
                        context.
                        Read again.
                        [example]
                        No, thanks.


                        PointedEars

                        Comment

                        • Jorge

                          #27
                          Re: IE Error &quot;Stop Running This Script&quot;

                          On Oct 24, 9:01 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                          wrote:
                          sasuke wrote:
                          Jorge wrote:
                          OTOH, unlike setTimeout(f, n), ISTM that a problem with the
                          setTimeout("f() ", n) form is that "f()" is going to be evaluated in a
                          different context than the one in which you set the timeout.
                          >
                          More specifically, always in the context of the global window object.
                          >
                          s/global//
                          >
                          However, that is _not_ different with a Function object reference.  What is
                          different is that the Function object reference as an argument *may* refer
                          to another object than the same identifier in a string literal.
                          >
                          And that it may have access to a closure.

                          --
                          Jorge.

                          Comment

                          • Jorge

                            #28
                            Re: IE Error &quot;Stop Running This Script&quot;

                            On Oct 24, 7:47 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                            wrote:
                            Jorge wrote:
                            David Mark wrote:
                            Thomas 'PointedEars' Lahn wrote:
                            >No, you don't.  eval() does not even enter into it.
                            I don't what?  And what do you think happens to that string?
                            It takes as much as 10x longer to call "f()" than to call f in
                            FF3+FireBug:
                            >>
                            Your test case is bogus as timeouts may accumulate if you use 0 as the
                            second argument (which is normalized to 10 on 32-bit CPUs).
                            It's not that "timeouts may accumulate" it's that they are accumulated
                            purposedly and are being called in a row one after the other "on the
                            same ms slot". Perhaps you don't understand the way it works ?

                            Perhaps your cpu "normalizes 0 to 10 ms" and you got the funny idea
                            that others do as well ?
                            But in most modern browsers and in nowadays computers the difference
                            is negligible
                            >
                            Exactly.
                            >
                            (even though it takes 1.5...3x longer) as we're talking about tens of
                            µs (not milliseconds).
                            >
                            You cannot know that, the timer resolution is just not fine enough.
                            WOW ! How come ? Of course I can. If 1404000 calls happen in a minute
                            a child can tell you that there are 23.4 calls per millisecond... and
                            that a call takes 42.735 µs... all that with just a *minutes* counter.
                            OTOH, unlike setTimeout(f, n), ISTM that a problem with the
                            setTimeout("f() ", n) form is that "f()" is going to be evaluated in a
                            different context than the one in which you set the timeout.
                            >
                            It isn't.
                            It is.

                            --
                            Jorge.

                            Comment

                            • Jorge

                              #29
                              Re: IE Error &quot;Stop Running This Script&quot;

                              On Oct 25, 7:25 pm, Dr J R Stockton <j...@merlyn.de mon.co.ukwrote:
                              >
                              Perhaps some test code should be developed and announced here.
                              >


                              (2nd attempt to post it, GoogleGroups is hanged for 2 days now, ISTM)
                              --
                              Jorge.

                              Comment

                              • Jorge

                                #30
                                Re: IE Error &quot;Stop Running This Script&quot;

                                On Oct 26, 11:02 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                                wrote:
                                >
                                Right. And must be an OS choice as well: (it's all green in my Mac
                                with "A" browsers) :
                                >>
                                This proves nothing.
                                >
                                ROTFL

                                --
                                Jorge.

                                Comment

                                Working...