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
Sencha Touch is a popular framework of Sencha for creating a user interface for mobile applications. It helps the developer create a mobile app using simple HTML, CSS, JS which supports many mobile devices such as android, IOS, BlackBerry, and Windows. It is based on MVC architecture.
Please run "sencha app upgrade" to update to 4.0. 2.67.
Sencha Cmd provides a workspace and package management system that assists in sharing framework code, packages, and custom code across multiple applications. You can easily integrate packages from the Sencha Package Repository or any other packages created by the Sencha community.
I have the same issue, the command builder isn't allowed to open a connection to localstorage so it crashes.
You should be able to set Ext.getStore('Members').setAutoLoad(true);
in the
launch: function () {
of app.js
.
Then your app will build and should still load the data into the store.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With