View Full Version : Ext.require is not a function

2 May 2011, 7:22 AM

I'm getting this error and can't seem to find any posts about it anywhere else.

I'm trying to add a column into my grid, which stores buttons. These buttons are supposed to open a modal window with some details about the row and editing options.

First though I'm just trying to get the modal window to work. I've more or less copied the demo code but am getting the previously mentioned error. When I take out the require I get "types[config.xtype || defaultType] is not a constructor"

Here's the code:


var win,
button = Ext.get('show-btn');

button.on('click', function(){

if (!win) {
win = Ext.create('widget.window', {
title: 'Layout Window',
closable: true,
closeAction: 'hide',
//animateTarget: this,
width: 600,
height: 350,
layout: 'border',
bodyStyle: 'padding: 5px;',
items: [{
region: 'west',
title: 'Navigation',
width: 200,
split: true,
collapsible: true,
floatable: false
}, {
region: 'center',
xtype: 'tabpanel',
items: [{
title: 'Bogus Tab',
html: 'Hello world 1'
}, {
title: 'Another Tab',
html: 'Hello world 2'
}, {
title: 'Closable Tab',
html: 'Hello world 3',
closable: true
button.dom.disabled = true;
if (win.isVisible()) {
win.hide(this, function() {
button.dom.disabled = false;
} else {
win.show(this, function() {
button.dom.disabled = false;

2 May 2011, 7:37 AM
Is this posted in the wrong forum? Ext.require was introduced with Ext4.0. Are you sure the Ext files are loaded and not 404?

2 May 2011, 7:46 AM
I see, I didn't realize it was only in 4.0. I assume the problem is that I'm not including the correct files then? How can I know which ones that I need?

2 May 2011, 8:06 AM
Your download contains a file called include_order.txt or look at any of the examples in your download examples folder