While I am building my sencha touch 2 app using the command:- sencha app build production
but it throws an error:
[INFO] Deploying your application to /Applications/MAMP/htdocs/iPadapp/build/production
[INFO] Copied sdk/sencha-touch.js
[INFO] Copied app.js
[INFO] Copied resources/css/app.css
[INFO] Copied resources/images
[INFO] Copied resources/icons
[INFO] Copied resources/loading
[INFO] Resolving your application dependencies...
[ERROR] Error thown from your application with message: TypeError: 'undefined' is not an object
I traced the error in my code . I found out , it is due to loading my list. Here is my code
Ext.define("myProject.store.Members",{
extend :'Ext.data.Store',
requires:"Ext.data.proxy.LocalStorage",
config: {
model :"myProject.model.Member",
sorters :'lastName',
autoload:true,
proxy: {
type: 'localstorage',
id : 'mainStore'
}
}
});
if I remove the line 'autoLoad: true' ( which breaks my application, then I can build the application. But my list is not loading. If I put it back the error repeats. I tried dynamically loading the list with load function , but it does not make any sense.
And here is the model.js file I amusing.
Ext.define('myProject.model.Member', {
extend: 'Ext.data.Model',
config: {
fields: [
'index',
'email',
'firstname',
'lastname',
'phone',
'currentemployer',
'currenttitle',
'interestlevel',
'tcgroupNames',
'active',
'lastlogin',
'usertypedesc',
'recruiternotes',
'recruitercontact',
'addtype',
'usertypedesc',
'jobtitle',
'ipAddress',
'recruitersource',
'agentkeywords',
{ name: "created", type: 'date' },
'recruiterprofileurl_linkedin',
'recruiterprofileurl_facebook'
]
}
});
Any Help is appreciated
Happy coding to all