A problem of using "this.",in a button's handler
January 5th, 2009i have some problems in customer class now
this is my code:
Ext.onReady(function()
{
FormWindow = function(config) {
this.string = "dddd";
Ext.apply(this, config);
FormWindow.superclass.constructor.call(this, {
title: this.title,
iconCls: 'feed-icon',
autoHeight: true,
resizable: false,
plain:true,
modal: true,
autoScroll: true,
closeAction: 'hide',
items: this.form,
buttons:[
{text:'Button',
handler:function(){alert(this.string);}
}
]
});
};
Ext.extend(FormWindow, Ext.Window, {
form : new Ext.Panel({width:400,height:200}),
title : "Windows"
});
win = new FormWindow();
win.show();
});
in the line of the button's handler, i want to alert this.string
but there's an error said this.string is undefined
how can i use the this.*** in the handler?:)
http://extjs.com/deploy/dev/docs/?class=Ext.Button&member=scope
#If you have any other info about this subject , Please add it free.# |
Posted in dballastages.com | edit