Ext.data.JsonP.Ext_TaskManager({"mixins":[],"code_type":"assignment","inheritable":false,"component":false,"meta":{},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":["Ext.Base","Ext.util.TaskRunner"],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"$className","id":"property-S-className"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"configMap","id":"property-configMap"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigList","id":"property-initConfigList"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigMap","id":"property-initConfigMap"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"isInstance","id":"property-isInstance"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"property","name":"self","id":"property-self"},{"meta":{"private":true},"owner":"Ext.util.TaskRunner","tagname":"property","name":"timerId","id":"property-timerId"}],"css_var":[],"method":[{"meta":{},"owner":"Ext.util.TaskRunner","tagname":"method","name":"constructor","id":"method-constructor"},{"meta":{"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."},"protected":true},"owner":"Ext.Base","tagname":"method","name":"callOverridden","id":"method-callOverridden"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"callParent","id":"method-callParent"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"configClass","id":"method-configClass"},{"meta":{},"owner":"Ext.util.TaskRunner","tagname":"method","name":"destroy","id":"method-destroy"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"getConfig","id":"method-getConfig"},{"meta":{},"owner":"Ext.Base","tagname":"method","name":"getInitialConfig","id":"method-getInitialConfig"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"hasConfig","id":"method-hasConfig"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"initConfig","id":"method-initConfig"},{"meta":{},"owner":"Ext.util.TaskRunner","tagname":"method","name":"newTask","id":"method-newTask"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"onConfigUpdate","id":"method-onConfigUpdate"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"setConfig","id":"method-setConfig"},{"meta":{},"owner":"Ext.util.TaskRunner","tagname":"method","name":"start","id":"method-start"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"statics","id":"method-statics"},{"meta":{},"owner":"Ext.util.TaskRunner","tagname":"method","name":"stop","id":"method-stop"},{"meta":{},"owner":"Ext.util.TaskRunner","tagname":"method","name":"stopAll","id":"method-stopAll"}],"css_mixin":[],"cfg":[{"meta":{},"owner":"Ext.util.TaskRunner","tagname":"cfg","name":"interval","id":"cfg-interval"}]},"tagname":"class","extends":"Ext.util.TaskRunner","html":"

Hierarchy

Files

A static Ext.util.TaskRunner instance that can be used to start and stop\narbitrary tasks. See Ext.util.TaskRunner for supported methods and task\nconfig properties.

\n\n

// Start a simple clock task that updates a div once per second\n var task = {

\n\n
  run: function(){\n      Ext.fly('clock').update(new Date().format('g:i:s A'));\n  },\n  interval: 1000 //1 second\n
\n\n

}

\n\n

Ext.TaskManager.start(task);

\n\n

See the start method for details about how to configure a task object.

\n
Defined By

Config options

The timer resolution. ...

The timer resolution.

\n

Defaults to: 10

Defined By

Properties

...
\n

Defaults to: "Ext.Base"

...
\n

Defaults to: {}

...
\n

Defaults to: []

...
\n

Defaults to: {}

...
\n

Defaults to: true

Get the reference to the current class from which this object was instantiated. ...

Get the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison

\n\n
Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); // dependent on 'this'\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n
\n
The id of the current timer. ...

The id of the current timer.

\n

Defaults to: null

Defined By

Methods

...
\n

Parameters

  • interval : Number/Object (optional)

    The minimum precision in milliseconds supported by this\nTaskRunner instance. Alternatively, a config object to apply to the new instance.

    \n

    Defaults to: 10

Returns

( Array/Arguments args ) : Objectdeprecatedprotected
Call the original method that was previously overridden with override\n\nExt.define('My.Cat', {\n constructor: functi...

Call the original method that was previously overridden with override

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n
\n

This method has been deprecated

\n

as of 4.1. Use callParent instead.

\n\n
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callOverridden(arguments)

    \n

Returns

  • Object

    Returns the result of calling the overridden method

    \n
( Array/Arguments args ) : Objectprotected
Call the \"parent\" method of the current method. ...

Call the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see Ext.define).

\n\n
 Ext.define('My.Base', {\n     constructor: function (x) {\n         this.x = x;\n     },\n\n     statics: {\n         method: function (x) {\n             return x;\n         }\n     }\n });\n\n Ext.define('My.Derived', {\n     extend: 'My.Base',\n\n     constructor: function () {\n         this.callParent([21]);\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // alerts 21\n
\n\n

This can be used with an override as follows:

\n\n
 Ext.define('My.DerivedOverride', {\n     override: 'My.Derived',\n\n     constructor: function (x) {\n         this.callParent([x*2]); // calls original My.Derived constructor\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // now alerts 42\n
\n\n

This also works with static methods.

\n\n
 Ext.define('My.Derived2', {\n     extend: 'My.Base',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Base.method\n         }\n     }\n });\n\n alert(My.Base.method(10);     // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n
\n\n

Lastly, it also works with overridden static methods.

\n\n
 Ext.define('My.Derived2Override', {\n     override: 'My.Derived2',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Derived2.method\n         }\n     }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callParent(arguments)

    \n

Returns

  • Object

    Returns the result of calling the parent method

    \n
Destroys this instance, stopping all tasks that are currently running. ...

Destroys this instance, stopping all tasks that are currently running.

\n

Overrides: Ext.Base.destroy

...
\n

Parameters

Returns the initial configuration passed to constructor when instantiating\nthis class. ...

Returns the initial configuration passed to constructor when instantiating\nthis class.

\n

Parameters

  • name : String (optional)

    Name of the config option to return.

    \n

Returns

  • Object/Mixed

    The full config object or a single config value\nwhen name parameter specified.

    \n
...
\n

Parameters

Initialize configuration for this class. ...

Initialize configuration for this class. a typical example:

\n\n
Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\n

Parameters

Returns

Creates a new Task instance. ...

Creates a new Task instance. These instances can\nbe easily started and stopped.

\n

Parameters

  • config : Object

    The config object. For details on the supported properties,\nsee start.

    \n
( Object names, Object callback, Object scope )private
...
\n

Parameters

( Object config, Object applyIfNotSet )private
...
\n

Parameters

Starts a new task. ...

Starts a new task.

\n\n

Before each invocation, Ext injects the property taskRunCount into the task object\nso that calculations based on the repeat count can be performed.

\n\n

The returned task will contain a destroy method that can be used to destroy the\ntask and cancel further calls. This is equivalent to the stop method.

\n

Parameters

  • task : Object

    A config object that supports the following properties:

    \n
    • run : Function

      The function to execute each time the task is invoked. The\nfunction will be called at each interval and passed the args argument if specified,\nand the current invocation count if not.

      \n\n

      If a particular scope (this reference) is required, be sure to specify it using\nthe scope argument.

      \n

      Parameters

        Returns

        • Boolean

          false from this function to terminate the task.

          \n
      • onError : Function

        The function to execute in case of unhandled\nerror on task.run.

        \n
      • interval : Number

        The frequency in milliseconds with which the task\nshould be invoked.

        \n
      • args : Object[]

        An array of arguments to be passed to the function\nspecified by run. If not specified, the current invocation count is passed.

        \n
      • scope : Object

        The scope (this reference) in which to execute the\nrun function. Defaults to the task config object.

        \n
      • duration : Number

        The length of time in milliseconds to invoke the task\nbefore stopping automatically (defaults to indefinite).

        \n
      • repeat : Number

        The number of times to invoke the task before stopping\nautomatically (defaults to indefinite).

        \n

    Returns

    Get the reference to the class from which this object was instantiated. ...

    Get the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics() is scope-independent and it always returns the class from which it was called, regardless of what\nthis points to during run-time

    \n\n
    Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n
    \n

    Returns

    Stops an existing running task. ...

    Stops an existing running task.

    \n

    Parameters

    • task : Object

      The task to stop

      \n

    Returns

    Stops all tasks that are currently running. ...

    Stops all tasks that are currently running.

    \n
    ","subclasses":[],"name":"Ext.TaskManager","alternateClassNames":[],"inheritdoc":null,"files":[{"href":"TaskManager.html#Ext-TaskManager","filename":"TaskManager.js"}],"html_meta":{},"singleton":true,"id":"class-Ext.TaskManager","statics":{"property":[],"event":[],"css_var":[],"method":[],"css_mixin":[],"cfg":[]},"requires":[]});