tmtrademark
30 Jun 2010, 3:07 PM
Greetings.
I am using a data.Store with a localStorageProxy like this:
charStore = new Ext.data.Store({
proxy: new Ext.data.LocalStorageProxy({
id: 'charStore-Proxy'
}),
autoload: true,
id: 'characterStorage',
storeId: 'store4char',
model: 'Character',
});
When I create a new record and add it to the store, then call charStore.sync(), everything is fine:
charStore.add(Ext.ModelMgr.create({name: thisChar.stats.name, character: thisChar}, 'Character'));
charStore.sync();
However, attempting to add any subsequent records causes this error:
ext-touch-debug-w-comments.js:8037 TypeError: JSON.stringify cannot serialize cyclic structures.
Had never seen this before. Commenting out the sync() function makes everything perform as expected.
I am using a data.Store with a localStorageProxy like this:
charStore = new Ext.data.Store({
proxy: new Ext.data.LocalStorageProxy({
id: 'charStore-Proxy'
}),
autoload: true,
id: 'characterStorage',
storeId: 'store4char',
model: 'Character',
});
When I create a new record and add it to the store, then call charStore.sync(), everything is fine:
charStore.add(Ext.ModelMgr.create({name: thisChar.stats.name, character: thisChar}, 'Character'));
charStore.sync();
However, attempting to add any subsequent records causes this error:
ext-touch-debug-w-comments.js:8037 TypeError: JSON.stringify cannot serialize cyclic structures.
Had never seen this before. Commenting out the sync() function makes everything perform as expected.