Results 1 to 6 of 6

Thread: Ext.util.Event.addListener() No method named 'onClose' found on scope object

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    303
    Answers
    7

    Default Answered: Ext.util.Event.addListener() No method named 'onClose' found on scope object

    Hi, I'm working on a project with ExtJS 6.0.2.437.
    Right now I'm not able to call a controller method from the object listener.

    It looks like a bug.

    Here a test case:
    https://fiddle.sencha.com/#fiddle/1i2j

    Code:
    Ext.define('APP.view.MediaController', {
        extend: 'Ext.app.ViewController',
        alias: 'controller.ctrl',
        
        onClose: function() {
            Ext.Msg.alert('Success', 'Controller started');
        }
    });
    
    
    Ext.define('APP.view.Media', {
        extend: 'Ext.Container',
        xtype: 'appmain',
        fullscreen: true,
        controller: 'ctrl',
        listeners: {
            element: 'element'
        },
    
    
        items: [{
            xtype: 'component',
            // Error: Ext.util.Event.addListener(): No method named 'onClose' found on scope object
            listeners: {
                element: 'element',
                click: 'onClose'
            },
            html: 'Click Me'
        }]
    });
    
    
    Ext.application({
        name : 'Fiddle',
    
    
        launch : function() {
            Ext.widget('appmain');
        }
    });
    The console error is:

    Code:
    Ext.util.Event.addListener() No method named 'onClose' found on scope object

    Any tips?
    Thanks for your support

  2. I believe that this is due to a bug (EXTJS-18439) which has been resolved in 6.2.0. Are you able to test with 6.2.0 to see if that is the case? There is an override on the bug ticket that may help until you are able to upgrade, to which you can gain access by opening a Support ticket in the portal (xCredits eventually refunded).

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I believe that this is due to a bug (EXTJS-18439) which has been resolved in 6.2.0. Are you able to test with 6.2.0 to see if that is the case? There is an override on the bug ticket that may help until you are able to upgrade, to which you can gain access by opening a Support ticket in the portal (xCredits eventually refunded).

  4. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    303
    Answers
    7

    Default

    Using framework 6.2.0 fix the problem. Thanks!

  5. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Fantastic! Happy to help.

  6. #5

    Default

    Hi , i am getting same issue for version 6.0.1 , and for now i can not upgrade my project , may i know where i can find override fix , which you have mentioned .

    Thanks in advance

  7. #6

    Default

    Quote Originally Posted by AvanishBajpai View Post
    Hi , i am getting same issue for version 6.0.1 , and for now i can not upgrade my project , may i know where i can find override fix , which you have mentioned .

    Thanks in advance
    Maybe same here. Any workaround? Thanks!

Similar Threads

  1. Replies: 0
    Last Post: 22 Dec 2012, 12:32 AM
  2. Replies: 0
    Last Post: 21 Dec 2012, 11:09 AM
  3. Replies: 4
    Last Post: 29 Mar 2010, 6:10 AM
  4. Why is scope declared in Ext.util.Event fire() method?
    By andyatmiami in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 5 Jul 2009, 4:19 AM
  5. Ext.util.Event Methode: addListener
    By muc1 in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 13 Apr 2007, 3:44 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
  •