martinrame
25 Feb 2012, 7:47 AM
Hi, I'm getting the error "object does not support this action" on IE 8. On Chrome and Firefox it works as expected.
The error is raised when I want to get a reference to the Viewport. My viewport has the alias "widget.viewport", also in the controller I created this ref:
refs: [
{
ref: 'viewport',
selector: 'viewport'
}
]
The line of code with the problem is inside a function defined in the controller:
showMainView: function()
{
item = this.getViewport().down('container[region=center]');
}
Why I'm getting the error?.
This is the complete controller:
Ext.define('MyApp.controller.Main', { extend: 'Ext.app.Controller',
models: [
'Customer'
],
stores: [
'Customers'
],
views: [
'CustomerGrid',
'MainToolbar'
],
refs: [
{
ref: 'viewport',
selector: 'viewport'
}
],
init: function() {
this.control({
});
},
showMainView: function() {
mainToolBar = Ext.create('MyApp.view.MainToolbar', {});
mainView = Ext.create('MyApp.view.CustomerGrid', {flex: 1});
// to be able to use "this.getViewport()" the a ref has to be added
// please take a look at the refs section of this file.
item = this.getViewport().down('container[region=center]');
item.add(mainToolBar);
item.add(mainView);
// load the store
this.getCustomersStore().load();
},
destroyAll: function() {
mainToolBar.destroy();
mainView.destroy();
this.destroy();
}
});
P.S.: I'm using ext-4.0.2a from cachefly.
The error is raised when I want to get a reference to the Viewport. My viewport has the alias "widget.viewport", also in the controller I created this ref:
refs: [
{
ref: 'viewport',
selector: 'viewport'
}
]
The line of code with the problem is inside a function defined in the controller:
showMainView: function()
{
item = this.getViewport().down('container[region=center]');
}
Why I'm getting the error?.
This is the complete controller:
Ext.define('MyApp.controller.Main', { extend: 'Ext.app.Controller',
models: [
'Customer'
],
stores: [
'Customers'
],
views: [
'CustomerGrid',
'MainToolbar'
],
refs: [
{
ref: 'viewport',
selector: 'viewport'
}
],
init: function() {
this.control({
});
},
showMainView: function() {
mainToolBar = Ext.create('MyApp.view.MainToolbar', {});
mainView = Ext.create('MyApp.view.CustomerGrid', {flex: 1});
// to be able to use "this.getViewport()" the a ref has to be added
// please take a look at the refs section of this file.
item = this.getViewport().down('container[region=center]');
item.add(mainToolBar);
item.add(mainView);
// load the store
this.getCustomersStore().load();
},
destroyAll: function() {
mainToolBar.destroy();
mainView.destroy();
this.destroy();
}
});
P.S.: I'm using ext-4.0.2a from cachefly.