Results 1 to 2 of 2

Thread: deferring function calls in ext

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Touch Premium Member
    Join Date
    Jun 2008
    Posts
    41

    Default deferring function calls in ext

    I am attempting to ping a server using Ext.Ajax.request, and I want to do it every second or so. Is there a way to defer the request by a second each time so i can control the rate at which it sends the request?

    I already attempted

    Ext.Ajax.request({config options,callback, etc.}).defer(1000);

    Inside the callback, I call another instance of of the function that calls the ajax request. I thought this would defer the request for 1 second, but it doesn't; the requests still happen quickly.

    Any help is appreciated.

    Thanks.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    The correct syntax is:
    Code:
    Ext.Ajax.request.defer(1000, Ext.Ajax, [{config options,callback, etc.}]);
    But I recommend using Ext.TaskMgr instead (see API docs for usage).

Posting Permissions

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