[CLOSED] Request error

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Request error

    When I submit a request, a error was occurred.

    Uncaught TypeError: Object [object Array] has no method 'remove'

    from: ext.axd?v=38586:8817

    The wrong code : this.queue.waitingList.remove(item);

    waitingList has no method 'remove'

    This error led to my data cannot refresh

    The entire code:
    onResult : function (options, success, response) {
                if (success === true) {
                    if (options.mode === "css") {
                        Ext.util.CSS.createStyleSheet(response.responseText);
                    } else {
                        var head = document.getElementsByTagName("head")[0],
                            el = document.createElement("script");
    
                        el.setAttribute("type", "text/javascript");
                        el.text = response.responseText;
    
                        head.appendChild(el);
                    }
    
                    var i = 0,
                        item = this.queue.getItem(options.url);
    
                    if (item !== null) {
                        item.loading = false;
                    }
    
                    if (options.loadCallback) {
                        options.loadCallback.apply(window, [options]);
                    }
    
                    if (options.groupCallback) {
                        options.groupCallback.step();
                    }
    
                    while (this.queue.waitingList.length > i) {
                        item = this.queue.waitingList[i];
    
                        if (item.url === options.url) {
                            if (item.loadCallback) {
                                item.loadCallback.apply(window, [item]);
                            }
    
                            if (item.groupCallback) {
                                item.groupCallback.step();
                            }
    
                            this.queue.waitingList.remove(item);
                        } else {
                            i++;
                        }
                    }
                }
                else {
                   Ext.net.DirectEvent.showFailure(response, response.responseText);
                }
    
                this.queue.dequeue(options);
    
                this.doLoad();
            },
    Click image for larger version. 

Name:	QQ截图20140224154722.png 
Views:	13 
Size:	83.7 KB 
ID:	7616
    Last edited by Daniil; Feb 27, 2014 at 11:21 AM. Reason: [CLOSED]
  2. #2
    Hi @GavinLou,

    Hard to say what is going wrong. Please provide a test case to reproduce.
  3. #3
    Please update from SVN, should be fixed now
  4. #4
    Quote Originally Posted by Vladimir View Post
    Please update from SVN, should be fixed now
    Thank you for your reply, I update from SVN and get version 2.4.0
    I find the code is same.
    The code is in the file of extnet-all-debug.js.
    I don't know whether I am right, I think this is a Syntax error.
    Because waitingList was defined as an array in "queue", but in the "OnResult", use queue.waitingList.remove(item).
    In javascript array has no method remove.
    I just express my opinion, If there is wrong, please point out my mistakes.
    Once again express my thanks
  5. #5
    2.4.0 is not the latest.

    You should update from:
    http://svn.ext.net/premium/trunk/
  6. #6
    Quote Originally Posted by Daniil View Post
    2.4.0 is not the latest.

    You should update from:
    http://svn.ext.net/premium/trunk/
    Thanks, I will try again!
  7. #7
    Quote Originally Posted by Daniil View Post
    2.4.0 is not the latest.

    You should update from:
    http://svn.ext.net/premium/trunk/
    Thank you for your advice, I find the way to correct the wrong code.
    But there is another question, I modify the extnet-all-debug.js and rebuild the solution.
    I copy the Ext.Net.dll to my project ,and rebuild my project, but the wrong code not repair. It is the same as before.
    Is there anything wrong? Where there is need to modify?
    Thankes
  8. #8
    Please try to clear the browser's cache.
  9. #9
    Quote Originally Posted by Daniil View Post
    Please try to clear the browser's cache.
    Yes, I have try this way,but it is useless.
  10. #10
    Quote Originally Posted by Daniil View Post
    Please try to clear the browser's cache.
    Click image for larger version. 

Name:	QQ截图20140226205616.png 
Views:	5 
Size:	26.2 KB 
ID:	7623
    The code "this.queue.waitingList.remove(item);" should be modified "Ext.Array.remove(this.queue.waitingList, item);";

    In the project Ext.Net, All of "this.queue.waitingList.remove(item)" was modify "Ext.Array.remove(this.queue.waitingList, item);".

    I modify three files :extnet-all-debug.js, extnet-all.js, Ext.Net\Build\Ext.Net\extnet\src\net\ResourceMgr.j s

    But it is useless.
Page 1 of 2 12 LastLast

Similar Threads

  1. Request failure error
    By Vaishali in forum 1.x Help
    Replies: 0
    Last Post: May 09, 2012, 5:23 AM
  2. Request failure : Internal Server Error
    By richard in forum 2.x Help
    Replies: 1
    Last Post: Mar 15, 2012, 12:16 PM
  3. Error 404.15 on AjaxMethod.Request with JSon
    By Spootnick in forum 1.x Help
    Replies: 1
    Last Post: Jun 16, 2011, 4:31 PM
  4. [CLOSED] request filtering module Error
    By LeeTheGreek in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 17, 2009, 3:12 AM
  5. [CLOSED] Request Failure Error
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 22, 2009, 7:11 AM

Tags for this Thread

Posting Permissions