PDA

View Full Version : [CLOSED] Request error



GavinLou
Feb 24, 2014, 8:01 AM
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.responseTex t);
} 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();
},

7616

Daniil
Feb 24, 2014, 10:44 AM
Hi @GavinLou,

Hard to say what is going wrong. Please provide a test case to reproduce.

Vladimir
Feb 24, 2014, 11:40 AM
Please update from SVN, should be fixed now

GavinLou
Feb 26, 2014, 9:40 AM
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

Daniil
Feb 26, 2014, 9:59 AM
2.4.0 is not the latest.

You should update from:
http://svn.ext.net/premium/trunk/

GavinLou
Feb 26, 2014, 10:02 AM
2.4.0 is not the latest.

You should update from:
http://svn.ext.net/premium/trunk/

Thanks, I will try again!

GavinLou
Feb 26, 2014, 11:18 AM
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

Daniil
Feb 26, 2014, 11:48 AM
Please try to clear the browser's cache.

GavinLou
Feb 26, 2014, 11:58 AM
Please try to clear the browser's cache.

Yes, I have try this way,but it is useless.

GavinLou
Feb 26, 2014, 12:05 PM
Please try to clear the browser's cache.

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.

Daniil
Feb 26, 2014, 12:30 PM
Please post the Page Sources (in the browser).


But it is useless.

Do you mean that the changes don't appear in the JavaScript sources of the page?

GavinLou
Feb 26, 2014, 12:36 PM
Please post the Page Sources (in the browser).



Do you mean that the changes don't appear in the JavaScript sources of the page?

Yes!That is what I mean.

Daniil
Feb 26, 2014, 12:52 PM
Ok, could you, please, do it?

Please post the Page Sources (in the browser).

The resources are not retrieved from Ext.Net.dll at all. They could be retrieved from CDN, for example.

Also double ensure you are referring the updated Ext.Net.dll in your project.

One thing more to try. Updating this file

Ext.Net\Build\Ext.Net\extnet\src\net\ResourceMgr.j s
and launching this file
Ext.Net/Build/Ext.Net/extnet/build.bat
will update all the required combined files (extnet-all.js, etc).

After that you should build the solution.

GavinLou
Feb 26, 2014, 1:23 PM
Ok, could you, please, do it?


The resources are not retrieved from Ext.Net.dll at all. They could be retrieved from CDN, for example.

Also double ensure you are referring the updated Ext.Net.dll in your project.

One thing more to try. Updating this file

Ext.Net\Build\Ext.Net\extnet\src\net\ResourceMgr.j s
and launching this file
Ext.Net/Build/Ext.Net/extnet/build.bat
will update all the required combined files (extnet-all.js, etc).

After that you should build the solution.

My Ext.Net version is 2.1.1. In this version, are the resources retrieved from Ext.Net.dll?

I am sorry, I was a new hand.

In my project, the bug was be throw from foreground page, and the file is the ext.axd?v=41522.

Is this file built by Ext.Net.dll?

GavinLou
Feb 26, 2014, 1:25 PM
Ok, could you, please, do it?


The resources are not retrieved from Ext.Net.dll at all. They could be retrieved from CDN, for example.

Also double ensure you are referring the updated Ext.Net.dll in your project.

One thing more to try. Updating this file

Ext.Net\Build\Ext.Net\extnet\src\net\ResourceMgr.j s
and launching this file
Ext.Net/Build/Ext.Net/extnet/build.bat
will update all the required combined files (extnet-all.js, etc).

After that you should build the solution.

File directory:

localhost\extnet\ext-net-debug-js\ext.axd?v=41522

Daniil
Feb 27, 2014, 3:45 AM
My Ext.Net version is 2.1.1. In this version, are the resources retrieved from Ext.Net.dll?

By default, yes. Do you have the Ext.NET v2.1.1 sources, right? Not just dlls, but all the sources.



localhost\extnet\ext-net-debug-js\ext.axd?v=41522

Please clarify where did you see this link? It doesn't look correct. There should be

extnet-all-debug-js
instead of

ext-net-debug-js

GavinLou
Feb 27, 2014, 6:58 AM
By default, yes. Do you have the Ext.NET v2.1.1 sources, right? Not just dlls, but all the sources.



Please clarify where did you see this link? It doesn't look correct. There should be

extnet-all-debug-js
instead of

ext-net-debug-js


I have the Ext.NET v2.1.1 sources.
you are right, and this is my spelling mistakes.
How could I modify Ext.NET v2.1.1 sources?
Thankes!

Daniil
Feb 27, 2014, 7:08 AM
In this way.


One thing more to try. Updating this file

Ext.Net\Build\Ext.Net\extnet\src\net\ResourceMgr.j s
and launching this file
Ext.Net/Build/Ext.Net/extnet/build.bat
will update all the required combined files (extnet-all.js, etc).

After that you should build the solution.

GavinLou
Feb 27, 2014, 7:42 AM
In this way.

Thank you very much.
With your help, I solved the problem.
The reason is that I copy wrong dll to my project.
Thank you again!