PDA

View Full Version : store in the grid is being flaged as error - cannot resolve symbol 'storename'



mrinsan
13 Apr 2015, 9:42 PM
My views are extended from Ext.Grid

and all stores are defined directly under store folder (no subfolders there)
but providing a valid store as a config param for the view(which is extended from grid) , is being flaged as error



Ext.define('MyApp.view.manager.MyGrid', {
extend : 'MyApp.view.common.grid.AbstractGridPanel',
store : 'MyStore' <=== This line is flaged cannot resolve symbol 'MyStore'
...
...
})


am using 0.1.211 version of the plugin in WebStorm 10

Another Question

If I use the ExtJS plugin should I disable
Language & Tools > JavaScript > Libraries > ExtJs 4.2, which comes pre-bundled with WebStorm ?

Mark.Brocato
14 Apr 2015, 4:22 AM
You only need to enable a JavaScript library for Ext JS if the Ext JS source resides outside of your project. I recommend including the Ext JS source in your project and disabling the Ext JS library that is built into WebStorm.Regarding the error - I can only reproduce it when the short name of my store class doesn't match the store config. Can you paste in your store class as well. Also, just checking, is completion working correctly in the MyGrid view. For example, if you type ctrl-space under the store property do you get the correct config suggestions?

estesbubba
14 Apr 2015, 7:24 AM
I have a similar problem with store and comboboxes. We use a custom store class but assign storeId for each instance after getting data from server. Any way to handle this would be great.

lrayman
8 May 2015, 5:27 AM
I also have a similar issue. I have a factory class that creates a customized instance of a store. The store class is passed in by name - but the name is flagged as an error.


var customStore = MyApp.util.CustomStoreFactory.create({
store: 'MyApp.store.NormalStore',
storeId: 'normalstore-customized',
customProps: { ... }
});

The store: line is flagged as an error.
The class is included in the requires list, and is actually referenced in another place in the same class, with no errors. Go figure!