-
1 May 2012 12:42 PM #1
[4.1.0] Ext.view.AbstractView problem with indexOf
[4.1.0] Ext.view.AbstractView problem with indexOf
Hi all,
indexOf in AbstractView is creating errors under some scenario.
We should have
or something equivalent for avoiding the error I get: Uncaught TypeError: Cannot read property 'viewIndex' of nullCode:indexOf: function(node) { node = this.getNode(node); // test for existence of node if(!Ext.isDefined(node)) {return -1} // end addition if (Ext.isNumber(node.viewIndex)) { return node.viewIndex; } return this.all.indexOf(node); }
Cheers,
C.
-
1 May 2012 5:48 PM #2
Thank you for the report!
Regards,
Scott
-
6 May 2012 8:10 AM #3
Also seeing this. Seems to be associated with a grid.
In my case node is null, and returning -1 after a test for null just pushes the problem further down the line.
-
31 Jul 2012 6:50 AM #4
I'm trying to determine if this is a related problem. I have a grid store that if I remove the store's content, store.removeAll(), and then repopulate the store via add() I get
"node is null" where this.getNode(node) returns null.
I have no problems the first time the store is loaded.Code:indexOf: function(node) { node = this.getNode(node); if (Ext.isNumber(node.viewIndex)) { // node is null here return node.viewIndex; } return this.all.indexOf(node); },
stack:
Thanks,Code:indexOf setPosition onViewRefresh() fire() continueFireEvent fireEvent(eventName="refresh") refresh() callParent refresh callParent refresh onAdd callAprent onAdd fire continueFireEvent(eventName="add"...) insert(index=0...) addSorted add .....
Jim
-
28 Nov 2012 8:21 AM #5
Getting the same error while removing the store contents and reinserting
Getting the same error while removing the store contents and reinserting
Hi can anyone help i am new to extjs and i am facing the same error while removing the store contents using store.removeAll() and reinserting using store.insert()
TypeError: A is null [Break On This Error]
if(Ext.isNumber(A.viewIndex)){return A.viewIndex}
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-6110
in
4.1.


Reply With Quote