Reputation: 186562
Mag.NewLightboxForm = Ext.extend(Ext.form.FormPanel, {
initComponent: function () {
this.items = [{
fieldLabel: 'Select Image',
name: 'img',
//xtype: 'magcombo',
xtype: 'button',
id: 'selectlightboximage',
store: mageditcontentcombostore,
//hiddenName: 'type',
listeners: {
'render': function() { window.ele = this; }
}]
}
});
In Ext 3.3, ele
references the EXT Element. I'm trying to get the reference to NewLightboxForm
dynamically so I can access .win
and .hide()
it.
Upvotes: 1
Views: 165
Reputation: 30082
Specify the scope in the listener:
{
render: function() {},
scope: this
}
In the function, this
will now point to the NewLightBoxForm
instance.
Upvotes: 2