PDA

View Full Version : [FIXED] Unable to remove root definition from reader



bseddon
6 Mar 2012, 4:08 AM
After adding a json reader to a store:


Ext.define('Photos.store.base.MyJsonReader', { extend: 'Ext.data.reader.Json',


constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
type: 'json',
id: 'PhotosFoldersReader'
}, cfg)]);
}
});

I wanted to try changing the root. However it was not helpful but I am unable to remove the root. If I try by using the delete menu option or by clicking on the 'default' button or by removing the content I see an error message stating that 'this config value for root is mandatory'. Clearly that's not the case. The only solution is to remove the reader and add it again.

Adding the reader again is not difficult but it would be great if it is possible to restore the default configuration .

Phil.Strong
9 Mar 2012, 7:19 AM
Yeah we're being too strict here.

Work around for now would be to use undo!

bseddon
9 Mar 2012, 7:24 AM
That assumes you are 'undo'ing when relevant change history is available. If you realize later, after making other changes or maybe the next day, there's no relevant history. The work around then is to delete the component and start over.

aconran
9 Mar 2012, 11:13 AM
This will be fixed in build > 311.