PDA

View Full Version : what 's wrong with Ext.BasciDialog in my code



sunrong
18 Nov 2010, 5:36 PM
code i used here:

var DefaultDialog = function(config) {
var config = config || {};
var defConfig = {
title: 'Default',
height: 130,
width: 250,
shadow: true,
modal: true,
draggable:true,
fixedcenter:true,
collapsible: false,
closable: true,
resizable:false
};
Ext.applyIf(config, defConfig);
var el = Ext.DomHelper.append(document.body, {tag: 'div'});
DefaultDialog.superclass.constructor.call(this, el, config);
};
Ext.extend(DefaultDialog, Ext.BasicDialog);

dlg = new DefaultDialog({title: 'First Dialog', width: 300});
console.log(dlg);


that got an error
"
sp is undefined
chrome://firebug/content/blank.gif spp = sp.prototype;
"
in ext-basic-debug.js

it seems there does not exit a supper class called Ext.BasicDialog.

i don't understand, hope someone give an explanation, and a correction is better.

thanks a lot.

fay
19 Nov 2010, 5:41 AM
I'm assuming that you're trying to use 1.x code in a later version of ExtJS as Ext.BasicDialog has been removed since 2.0. See the Migration Guide (http://www.sencha.com/learn/Ext_1_to_2_Migration_Guide#Upgrading_BasicDialog_to_Window).

sunrong
19 Nov 2010, 6:39 PM
yes. I am learning OP of extjs, and see this example. i try it and see this error.


thanks for your help.