Results 1 to 2 of 2

Thread: Uncaught TypeError: Cannot read property 'scope' of undefined

  1. #1
    Sencha User
    Join Date
    Jun 2017
    Posts
    25
    Answers
    2

    Default Answered: Uncaught TypeError: Cannot read property 'scope' of undefined

    Hello there. I'm facing with a problem about usage of ViewController. I've created a panel and using handler config on tools items. It should call 'SettingsWindow' class and in this class I'm using another listener config.
    But because of this listener I'm not able to display 'SettingsWindow'. It cause to this error;

    Code:
    Uncaught TypeError: Cannot read property 'scope' of undefined
        at constructor.addListener (Observable.js?_dc=1516085908845:1135)
        at constructor (Observable.js?_dc=1516085908845:403)
        at constructor.beforeInitConfig (Component.js?_dc=1516085908844:2261)
        at Ext.Configurator.configure (Configurator.js?_dc=1516085908845:558)
        at constructor.initConfig (Base.js?_dc=1516085908844:1554)
        at constructor (Component.js?_dc=1516085908844:2137)
        at new constructor (Class.js?_dc=1516085908844:42)
        at Object.widget (ClassManager.js?_dc=1516085908844:1638)
        at constructor.create (ComponentManager.js?_dc=1516085908846:76)
        at constructor.lookupComponent (Container.js?_dc=1516085908844:1564)

    • So how can i be succeed to use a handler and a listener on those classes?
    • Or what can use as another method to display 'SettingsWindow' on controller. When I try to disable handler of gear tool and using a listener then it says "this.lookupReference is not a function"
    • I've try to create a fiddle sample here but actually couldn't success to run it @ https://fiddle.sencha.com/#view/editor&fiddle/2bus

  2. I've found a solution for this error. Created a function within window class and return it;

    Code:
    getSettingsItems: function () {
        var me = this;
    
        var settingsItems = [];
    
        return settingsItems;
    },
    Well the thing I've do more readings and practices to get whole application structure of both JS and Ext JS...

  3. #2
    Sencha User
    Join Date
    Jun 2017
    Posts
    25
    Answers
    2

    Default

    I've found a solution for this error. Created a function within window class and return it;

    Code:
    getSettingsItems: function () {
        var me = this;
    
        var settingsItems = [];
    
        return settingsItems;
    },
    Well the thing I've do more readings and practices to get whole application structure of both JS and Ext JS...

Similar Threads

  1. Replies: 14
    Last Post: 25 Jun 2015, 8:18 AM
  2. Replies: 1
    Last Post: 13 Jan 2014, 12:58 PM
  3. [INFOREQ] [2.2] Uncaught TypeError: Cannot read property 'length' of undefined
    By SunboX in forum Sencha Touch 2.x: Bugs
    Replies: 6
    Last Post: 11 Jul 2013, 2:19 PM
  4. Uncaught TypeError: Cannot read property 'data' of undefined
    By bee in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 27 Apr 2012, 9:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •