PDA

View Full Version : [FIXED][PR3] Ext.data.Model : method setProxy unknown



xcambar
15 Mar 2011, 1:01 PM
Hi,
I'm trying to change the proxy of a model programmatically instead of specifying it through the configuration.

So after digging through the docs, I've found out a documented method called 'setProxy'. After the necessary attempts, here's what I've come up with:



Ext.regModel('Test', {
'constructor' : function() {
this.callParent(arguments);
// this.setProxy(new Ext.data.Proxy());
this.proxy = new Ext.data.Proxy(); // Worked
return this;
}
});
//Test.setProxy(new Ext.data.Proxy());


var t = new Test();
//t.setProxy(new Ext.data.Proxy());


Though setting the property directly worked as expected, the commented methods calls always returned me the error

"Object [object Object] has no method 'setProxy'".

Did I do something wrong to get such an error ? To give a little more details, I'm running the PR3 and have actually found that setProxy method in Model.js, which has been quite a bit of a surprise!


Thanks for your time and interest,

evant
15 Mar 2011, 11:10 PM
This should be resolved in the next release (after PR4).

xcambar
16 Mar 2011, 12:50 AM
Great!

Thanks for all the hard work!