PDA

View Full Version : [FIXED] Ext.util.ItemCollection not required by Ext.Container



mankz
22 Jul 2015, 1:07 AM
Not possible to load Ext JS on demand since it crashes on


/**
* The MixedCollection containing all the child items of this container.
* @property items
* @type Ext.util.AbstractMixedCollection
* @since 2.3.0
*/
me.items = new Ext.util.ItemCollection();

LesJ
22 Jul 2015, 5:39 AM
Not possible to load Ext JS on demand since it crashes on


/**
* The MixedCollection containing all the child items of this container.
* @property items
* @type Ext.util.AbstractMixedCollection
* @since 2.3.0
*/
me.items = new Ext.util.ItemCollection();

ItemCollection doesn't subclass AbstractMixedCollection, so perhaps this assignment should be the following: :-?

me.items = new Ext.util.MixedCollection();

Ext.util.MixedCollection is required by container.

Ext.define('Ext.container.Container', {
extend: 'Ext.Component',
....
requires: [
'Ext.util.MixedCollection',
'Ext.layout.container.Auto',
'Ext.ZIndexManager'
],
...

evant
22 Jul 2015, 4:03 PM
Thanks for the report! I have opened a bug in our bug tracker.

SebTardif
23 Jul 2015, 3:47 AM
I would think Sencha Cmd has all the logic or almost all the logic to do static analysis and detect mismatch. Maybe Sencha could use that to do sanity check on the framework itself?

LesJ
25 Jul 2015, 3:06 AM
Why MixedCollection is still required if it's not used?

Ext.define('Ext.container.Container', {
...
requires: [
'Ext.util.MixedCollection',
...
'Ext.util.ItemCollection'
],
...

Also, the doc should probably refer to ItemCollection instead ...:-?

...
* For additional information see {@link Ext.util.MixedCollection#get}.
*
* @return {Ext.Component} The component (if found).
*
* @since 2.3.0
*/
getComponent: function(comp) {
....