28 Mar 2012 4:32 PM #1
Stores are including global prototype methods in item data.
Sencha Touch version tested:
- 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".
29 Mar 2012 5:50 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.