PDA

View Full Version : [FIXED] [PR2] this.setConfig() broken



olouvignes
17 Nov 2011, 4:17 AM
There seems to be some issues with object config on ST2, my grouped lists are gone (group headers - list ok).



Ext.define('App.view.project.SomeList', {


id: 'some-list',
alias: 'widget.some-list',
extend: 'Ext.List',


config: {},


initialize: function() {


// Set configuration
this.setConfig({
ui: defaults.ui,
store: 'SomeStore',
grouped: true,
disableSelection: true,
preventSelectionOnDisclose: true,
itemTpl: ['<strong>{name}</strong>'].join('')
});

Grouped not working -> this.getGrouped() returns false!



Ext.define('App.view.project.SomeList', {


id: 'some-list',
alias: 'widget.some-list',
extend: 'Ext.List',


config: {grouped: true},


initialize: function() {


// Set configuration
this.setConfig({
ui: defaults.ui,
store: 'SomeStore',
disableSelection: true,
preventSelectionOnDisclose: true,
itemTpl: ['<strong>{name}</strong>'].join('')
});

Grouped not working -> this.getGrouped() returns true but ST breaks on updatePinHeaders(), var 'store' being empty (cannot call method 'on' of null).
Was broken on PR1 too.



Ext.define('App.view.project.SomeList', {


id: 'some-list',
alias: 'widget.some-list',
extend: 'Ext.List',


config: {grouped: true, store: 'SomeStore'},


initialize: function() {


// Set configuration
this.setConfig({
ui: defaults.ui,
disableSelection: true,
preventSelectionOnDisclose: true,
itemTpl: ['<strong>{name}</strong>'].join('')
});

ST crashes : doAddHeader() Uncaught TypeError: Cannot call method 'insertFirst' of null.
Worked fine on PR1.

Would love to have some override/patch as i can't make group headers work with PR2.

Jamie Avins
17 Nov 2011, 9:14 AM
I will check into the setConfig issue. The list issues has already been resolved for the next release. Due to the size of the change an override isn't really feasible. We will try to have another PR out soon to address the problem.