PDA

View Full Version : [FIXED] Crash when subclassing treestore



mankz
5 Jun 2014, 11:01 AM
Ext.define("foo", {
extend : 'Ext.data.Model'
});

Ext.define('foostore', {
extend : 'Ext.data.TreeStore',
model : 'foo'
})

var resourceStore = new foostore({
proxy : {
type : 'ajax',
reader : 'json',
url : 'tree/123_treeview_rowheight.data.js'
}
});

LesJ
5 Jun 2014, 12:10 PM
You extend Model. Would it help if you extended TreeModel instead?

mankz
5 Jun 2014, 12:12 PM
That seems to fix it though this is not an option for us. Test case is still very valid :)

LesJ
5 Jun 2014, 12:39 PM
Test case is still very valid :)

Apparently it's not valid in 5.0 ;)

LesJ
6 Jun 2014, 11:30 AM
I don't see any mention in the Upgrade Guide (http://docs.sencha.com/extjs/5.0.0/whats_new/5.0/extjs_upgrade_guide.html) that the tree store must now use models which extend the TreeModel class.

This wasn't a requirement in 4.2.2. Many 4.* tree examples (http://www.sencha.com/forum/showthread.php?263773-TreeModel-not-used-in-TreeStore-examples)used models which extended the Model class, not TreeModel.

If this is not a bug but a new requirement, then this change should be mentioned in the Upgrade Guide.

mankz
3 Aug 2014, 6:14 AM
Bump. Is this logged, fixed?

evant
3 Aug 2014, 6:24 AM
I can't reproduce it on the latest nightly using your test code, seems it was fixed.