3 Replies Latest reply on Dec 13, 2010 11:47 AM by dying veteran

    Requesting tutorial examples of setTimeOut()

    RainbowChunChunChang

      Requesting tutorial examples of setTimeOut()

       

      How does the operation of the two blocks differ ? The intent is to have a delay

       

      app.setTimeOut("function1()",1001); // Is the delay of 1001ms before or after function1() call ?
      app.setTimeOut("function2()",1002);

      app.setTimeOut("function3()",1003);

      app.setTimeOut("function4()",1004);

       

       

      Do all the setTimeOut() calls initiate almost parallel threads ? or one after another ?

       

      I have given slighty different times to be able to identify the function just by its time

      for the convenience of anyone replying.

       

      Any demo example to clarify its meaning ?

       

      Thanks,

      Rainbow Chang

        • 1. Re: Requesting tutorial examples of setTimeOut()
          Bernd Alheit Adobe Community Professional & MVP
          Do all the setTimeOut() calls initiate almost parallel threads ? or one after another ?

          Adobe Acrobat and Adobe Reader uses only one thread.

          • 2. Re: Requesting tutorial examples of setTimeOut()
            RainbowChunChunChang Level 1

            Sorry, not very clear.

             

            What is the sequence of time delay and execution ?

             

            I want a time delay between the functions. They can be something as simple as moving from one named destination to another in a file.

             

            Would you have an example I can execute in the debugger ? And if you show me how to place break points etc.

             

            I dont seem to figure out how to place breakpoints. I am using writer.

             

            Thanks,

             

            Rainbow Chang

            • 3. Re: Requesting tutorial examples of setTimeOut()
              dying veteran Level 1

              1. Dec 9, 2010 8:56 AM  in response to: RainbowChunChunChang
              Re: Requesting tutorial examples of setTimeOut()

               

              RainbowChunChunChang > Do all the setTimeOut() calls initiate almost parallel threads ? or one after another ?

               

              Bernd Alheit > Adobe Acrobat and Adobe Reader uses only one thread.

               

              Even if his comment is not lying, it is certainly misleading you.

               

              In the code fragment below

               

              setTimeOut( "f();" , 5000 ) ;
              g() ;

               

              the setTimeOut is executed and right away the execution passes to g(), while the setTimeOut waits 5s before executing f() , the execution of g() has already started and even completed.

               

              You should try some color change example because that is more amenable to a debugger than jumping or alert box.

               

              Dying Soldiers in Afghanistan