Results 1 to 2 of 2

Thread: Ext.util.TaskRunner

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Dec 2009
    Posts
    35

    Default Ext.util.TaskRunner

    Ext JS version: 3.3.1

    When TaskRunner is started for first time, it fires first event at wrong interval. The interval which first event is fired is the interval you pass as the constructor parameter not the interval of the currently started task.

    I investigated thet code and noticed that bug is in below code:

    Code:
        
    this.start = function(task){
      tasks.push(task);
      task.taskStartTime = new Date().getTime();
      task.taskRunTime = 0;
      task.taskRunCount = 0;
       startThread();
       return task;
      };
    Correct code should be something like this:
    Code:
        
    this.start = function(task){
      tasks.push(task);
      task.taskRunTime = task.taskStartTime = new Date().getTime();
      task.taskRunCount = 0;
       startThread();
       return task;
      };
    Sample test case:
    Code:
    var updateClock = function(){
        Ext.fly('clock').update(new Date().format('g:i:s A'));
    } 
    var task = {
        run: updateClock,
        interval: 5000 //5 seconds
    }
    var runner = new Ext.util.TaskRunner(50); // 50 ms timer resolution
    runner.start(task);

  2. #2

    Default

    i have same problem, can anyone confirm this?

Similar Threads

  1. Something similar to Ext.util.Taskrunner
    By blessan in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 16 Aug 2010, 10:53 PM
  2. Ext.util.TaskRunner : stopAll stops nothing at all!...
    By iBeb in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 28 Jun 2010, 7:23 AM
  3. [ext-2.0-rc1]multible countdowns with Ext.util.TaskRunner
    By Meckerpoet in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 1 Dec 2007, 2:38 AM
  4. Ext.util.TaskRunner doubt
    By pongz79 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 15 Nov 2007, 8:33 AM
  5. Object and prototype in Ext.util.TaskRunner
    By dolittle in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 5 Nov 2007, 3:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •