parallax background

Writing an asynchronous task that takes a parameter (Ext JS 4.x)

Digital Transformation Group LinkedIn
Displaying an iFrame at 100% height and width in a dynamic Panel (Ext JS 4.x)
April 27, 2012
Digital Transformation Group LinkedIn
Calculating the scrollbar height of an iFrame (Ext JS 4.x)
May 1, 2012

I couldn’t actually find an example of how to do this in any of the documentation, forums, or the rest of the internet so I resorted to looking at the source code for Ext.util.TaskRunner. I was able to find that the “task” object passed into the TaskRunner has an “args” attribute that is an array of objects.

In this example that “updateClock” function is called every 100 ms with the alpha and bravo parameters.

var updateClock = function(alpha, bravo){
 console.log('alpha = '' + alpha + ' and bravo = ' + bravo);                
var task = {
 run: updateClock,
 interval: 100,
 args: ['Argument 1', 'Argument 2']

var runner = new Ext.util.TaskRunner();


I live and work in the Dallas/Fort Worth area as a Principal Consultant for AppFoundation. I have been working with Java since 2000, Flex since it was in beta release, iOS development since 2008, and Sencha and Ext JS 4 since 2012. I have a Bachelor of Music with a double major in Music Performance and Music Composition, and a Bachelor of Science in Computer Information Science from Texas Christian University. I also have a Master of Science in Software Engineering from Southern Methodist University. I specialize in enterprise development, architecture, design, and continuous integration practices.

Comments are closed.