extjs - Javascript - Sencha touch 2.1 - Calling an app.js level function returns "[object Object] has no method 'getLocalLoggedUserDetails'" -
i have written simple global function @ app.js level of sencha touch 2.1 application. now, based on clues found here on stack , other sources, have phone call everywhere like
timemobile.app.myglobalfunction(params);
the point is, not work , error:
uncaught typeerror: object [object object] has no method 'getlocalloggeduserdetails'
i tried phone call launch() function instead , working. puzzling me more before because @ point it's not syntax problem.
i phone call global function this:
var loggeduserdetails = timemobile.app.getloggeduserdetails(true);
and app.js defined this:
ext.loader.setconfig({ enabled: true }); ext.application({ models: [ 'loginresponse' ], stores: [ 'loginstore', 'plannedactivityliststore', 'remoteuserdetailsstore', 'localuserdetailsstore' ], views: [ 'loginview' ], name: 'timemobile', controllers: [ 'ctllogin', 'ctlplannedactivities' ], launch: function() { //this.timemobile =this; timemobile.app.loggeduser =''; timemobile.app.loggeduserpsw =''; timemobile.app.anagid = 'ctel'; timemobile.app.currentdate = new date().toisostring(); timemobile.app.loggeduserdetails = timemobile.model.mdluserdetails(); ext.create('timemobile.view.loginview', {fullscreen: true}); }, getloggeduserdetails: function(enabled) { if (enabled) { //var store= timemobile.app.localuserdetailsstore(); //return store.getat(0); console.log('called'); } else { homecoming null; } } }); when phone call getloadeduserdetails syntax timemobile.app.getloadeduserdetails(true); error mentioned. timemobile.getloadeduserdetails(true); not work either.
any suggestions?
chrome caching preventing app.js downloaded upon application refresh.
my bad.
to disable chrome caching, go console, click on gear icon on bottom-right corner , find "disable cache" checkbox in "general" tab.
p.s. for ones -1ed without sayng question, have fun (on profile can find alot of questions or reply can have bit more fun).
javascript extjs sencha-touch-2
No comments:
Post a Comment