View Full Version : Stores are including global prototype methods in item data.

28 Mar 2012, 4:32 PM
Sencha Touch version tested:

Platform tested against:

Google Chrome

When a prototype method is added to "Object", that method is included as a property in the "data" object of every item in every store.
This causes problems when attempting to call "setValues" on a form.
The method should remain in the prototype where it can be filtered out using "hasOwnProperty".
Test Case:


29 Mar 2012, 5:50 AM
This has nothing to do with sotres. You are affecting all objects which will have adverse affects. The issue with your test case is the fields object has the union method and this is where it tries to set the values. You really shouldn't mess with the prototype, in Ext JS 4 and ST2 we have even moved away from this bad practice, reason for Ext.Date, Ext.Function and others.