PDA

View Full Version : copy and apply an object



Stephan123
23 Nov 2009, 3:02 AM
Hello !

I have build an standard window.


var navigation = 0;

Ext.ns('pebbel');

// standard window
pebbel = function(){

return{
fenster: function(){
var wert = new Ext.Window({
title: 'Test1',
width: 400,
height: 400,
id: 'fenster'
});

wert.show();
},

info: 'Hallo'


}; // Ende public

}(); // Ende des Pebbel

In the second step i change the public method and property.


Ext.apply(pebbel,{
fenster: function(){
var wert = new Ext.Window({
title: 'Test2',
width: 200,
height: 500,
id: 'fenster'
});

wert.show();
},

info: 'Hallo 1'
});

Now the problem.
I will call with an event (navigation handler) the

Ext.apply(pebbel, ...

I need an tip for an good way to call the apply ...

Your sincerly

Stephan