PDA

View Full Version : [FIXED] Ext.mixin.Bindable.removeBindings Exception



FBNitro
28 Apr 2015, 10:16 AM
In Ext.Container, I'm calling MyContainer.removeAll(false, true).

In Ext.mixin.Bindable.removeBindings, it's throwing an exception:


removeBindings: function() {
var bindings = this.bind,
key, binding;
if (bindings && typeof bindings !== 'string') {
for (key in bindings) {
binding = bindings[key];
binding.destroy(); // This line errors
binding._config = binding.getTemplateScope = null;
}
}
this.bind = null;
},

Pass 1: Binding = Ext.mixin.Hookable which does not have a public destroy method
Pass 2: Binding = "bind" (a string) which does not have a public destroy method
Pass 3: Binding = "Ext.mixin.Hookable#bind" (a string) which does not have a public destroy method

Gary Schlosberg
28 Apr 2015, 12:24 PM
Thanks for the report. Can you please post a test case which reproduces the issue?
https://fiddle.sencha.com/#home

FBNitro
4 May 2015, 1:04 PM
If you create an Ext6 modern app with the following code, it will reproduce the issue:

m9p

On Touch 2.4.1, this code works fine. The defect seems specific to calling removeAll when a list is in a panel.

Ext version tested:


Ext 6.0




Browser versions tested against:



IE10
Chrome27




DOCTYPE tested against:


____




Description:


Describe the problem in greater detail here, summarizing the behavior.




Steps to reproduce the problem:


Create an Ext6 Modern only app. Place the above code in it and run it.




The result that was expected:


The App should not crash.




The result that occurs instead:


The App crashes (see javascript console) with error: Uncaught TypeError: Object has no method 'destroy'app.js?_dc=1430773901684:36044 (http://localhost:1841/app.js?_dc=1430773901684)

evant
4 May 2015, 5:11 PM
Thanks for the report! I have opened a bug in our bug tracker.

sdruckerfig
8 Jan 2017, 6:22 AM
Seems that there's a similar issue in Ext 6.2.1, classic toolkit

The error occurs in Ext.mixin.Bindable in the removeBindings() method:


removeBindings: function() {
var me = this,
bindings, key, binding;
if (me.$hasBinds) {
bindings = me.getBind();
if (bindings && typeof bindings !== 'string') {
for (key in bindings) {
binding = bindings[key];
binding.destroy();
binding._config = binding.getTemplateScope = null;
}
}
}
me.setBind(null);
}

The problem occurs because one of the keys in bindings is "validation" and has a value of null.

klodoma1
15 Sep 2017, 4:32 AM
Is this bug really fixed?
I have the same issue on 6.5.1

FabSka
21 Feb 2018, 12:41 AM
Is this bug really fixed?
I have the same issue on 6.5.1
Hello, i'm following this.
I have the same problem on 6.5.1 too.

When i'm trying to remove my view i have an error "Cannot read property 'destroy' of undefined" in the binding.destroy().

the object (the "me" in the function) with the bind that can't be removed is a button that does not exist in my view, and it's binded to a null text.
I don't know what else to do, really fancy some help there :D