I have a store which is set to autoLoad whose model contains the proxy. This proxy uses a static variable that I declare in another model to define the URL. About 80% of the time everything works fine, however, 20% of the time the app produces an error saying either that the model containing the variables (BaseModel) is undefined or that the model namespace (MyApp.model) is undefined. Refreshing my browser will usually get it to work again, but I can't have the app hang at a white screen 20% of launches.
I'm using Sencha Touch 2.0.0.
I've tested in Chrome, Safari (Desktop), Safari (iPhone), and Safari (iPad), but not native packaging.
Specific errors I'm receiving:
"Uncaught TypeError: Cannot read property 'VAR1_NAME' of undefined",
"Uncaught TypeError: Cannot read property 'BaseModel' of undefined",
* File: app/model/BaseModel.js
* Base model for all other models to extend. Overrides the save function.
// config and other functions below ...
Again, I only receive the error about 20% of the time; the rest of the time everything works properly, so I'm fairly certain it's not how I'm storing the static variables or anything. In my app I have several models that use the same variables, so I can't just move them to the PrimaryModel, unfortunately. If someone has a solution or a workaround, I'd love to hear it.
* File: app/model/PrimaryModel.js
// fields and other configs here ...