• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED]Issue with using a config settings js in MVC app

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED]Issue with using a config settings js in MVC app

    getting error : Uncaught TypeError: Cannot read property 'Settings' of undefined

    What am I not seeing?

    Code:
    //Settings.js (path /Inquiry/app/config)
    Ext.define('Inquiry.config.Settings',{
        singleton: true,
        config: {
            balsheetAuthority: 'Y'
        },
        constructor: function(config){
            this.initConfig(config);
        }
    });
    
    //app.js
    Ext.Loader.setConfig({
        enabled: true
    });
    Ext.create('Ext.app.Application', {
    	controllers: ['Main'],
    	stores: ['Companys', 'Departments','Gltrans','Years','Periods','Trialbalances','Rglmst','AcctTrialBals','DetailTrialBals','Notes'],
    	name: 'Inquiry',
    	appFolder: '/html/nocs-dev/GenLedger/Inquiry/app',
            launch: function() {
        	Ext.Ajax.request({
    	     url: 'vvcall.pgm',
                 params: {
    		pgm: 'glapp',
    		action: 'getSettings'
    	     },
    	     success: function(response) {
    	     var data = Ext.decode(response.responseText);
    	     Inquiry.config.Settings.setBalsheetAuthority(data.balsheetAuthority);
    	     Ext.create('Inquiry.view.Viewport');
    	}
    });
    }
    });

  • #2
    Mike,

    You're just missing the requires in your application "app.js".

    Code:
    requires: ['Inquiry.config.Settings'],

    Comment


    • #3
      Thanks! Knew it had to be something simple... duh...

      Comment


      • #4
        It always is!

        Comment

        Working...
        X