Hi guys,
I run into the trouble when I set data for model in the refresh event of store. My app is simple Note app.
Enviroment: ST 2.0.1.1, OS: window 7, browser: Safari 5.1.7.
Some code here:
init of controller - I load data here
Code:
this.callParent(arguments);
console.log('note controller init');




var notesStore = Ext.getStore("storeNote");
notesStore.on('refresh', function()
{
    console.log('refresh store');
    notesStore.each(function(record)
    {
        var cipher = Decrypt_text('text', keyManulife, record.get('cipher'), 'codegroup');
        //var cipher = Aes.Ctr.decrypt(record.get('cipher'), 'Manulife', 128);
        
        var arrayOfStrings = cipher.split(';');
        record.set('title', arrayOfStrings[0]);
        record.set('narrative', arrayOfStrings[1]);
    });
});
save data - beforesyn of store
Code:
console.log('before sync');
var notesStore = Ext.getStore("storeNote");
notesStore.each(function(record)
{
    var plain = record.get('title') + ';' + record.get('narrative');
    record.set('cipher', Encrypt_text('text', keyManulife, plain, 'codegroup'));
    //record.set('cipher', Aes.Ctr.encrypt(plain, 'Manulife', 128));
    record.set("title", '@@@');
    record.set("narrative", '@@@');
});
When I create a new record and save so it'ok (just navigate between two form: list and editor - the refresh event happened here).
refresh-ok.jpg

But when I close the browser, and re-open the app, the error happended, like below:
refresh-fail.jpg

and detail:
refresh-trouble-here.jpg

I think something is wrong here (data is ok):
refresh-callstack.jpg

Please take a view, and share me some experiences to solve it.
Thanks so much!