Object function has no way to defer

I am trying to display a progress bar in a grid (Ext JS) and get this error:

Object function has no way to defer

What is this "magic" method? What does it do? And why is he not found? The code:

renderer: function (value, meta, rec, row, col, store){ var id = Ext.id(); (function(){ new Ext.ProgressBar({ renderTo: id, value: 0.5 }); }).defer(25); return '<span id="' + id + '"></span>'; } 
+6
source share
3 answers

The defer function defer used to delay a function call in X milliseconds. Try the syntax as follows:

 Ext.Function.defer(function(){ new Ext.ProgressBar({ renderTo: id, value: 0.5 }); }, 25); 

This should work as per ExtJS API documentation .

+10
source

What version of ExtJS are you using?

Are you sure all downloaded ExtJS? You get the same error when running this code from the browser command line:

 (function(){alert("Hello");}).defer(1000); 
+2
source

Ext.defer or Ext.function.defer is a function similar to javascript setTimeout function.

http://astutejs.blogspot.in/2015/06/extjs-what-is-extdefer.html

0
source

Source: https://habr.com/ru/post/886061/


All Articles