-
5 Apr 2012 1:23 PM #1
BUG 4.1-RC1: Model instance with proxy causes exception when Ext.required by itself
BUG 4.1-RC1: Model instance with proxy causes exception when Ext.required by itself
Example model:
If I have a page (in this case a unit test) that includes this model synchronously (although I don't believe the synchronicity should matter):Code:Ext.define('jx.model.Artifact', { extend: 'Ext.data.Model', requires: [ 'Ext.data.proxy.Ajax', 'Ext.data.reader.Json' ], fields: [{ name: 'id', defaultValue: null, mapping: 'id' }, { name: 'version', defaultValue: null, mapping: 'version' }], proxy: { type: 'rest', url: '/artifacts', reader: { type: 'json' } } });
I get an exception in Ext.data.Proxy, line 225:Code:Ext.syncRequire('jx.model.Artifact');
Exception:Code:if (!(writer instanceof Ext.data.writer.Writer)) {
Possible workaround is to require "Ext.data.writer.Writer" in my model instance, but really "Ext.data.Proxy" should be requiring this class since it needs it.Code:Ext.data.writer is undefined
-
6 Apr 2012 6:53 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
Ext.data.writer.Writer should be added to the requires array.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
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 services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-5862
in
4.1.


Reply With Quote