You found a bug! We've classified it as EXTJS-9309 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    493
    Vote Rating
    3
    MaximGB is on a distinguished road

      1  

    Default Component's event(s) suspending state is ignored by Controllers / Application

    Component's event(s) suspending state is ignored by Controllers / Application


    REQUIRED INFORMATION


    4.2.0
    • Ext 4.2.0 rev 663

    Browser versions tested against:
    • Chrome (26.0.1410.43)

    DOCTYPE tested against:
    • <!DOCTYPE HTML>

    Description:
    • Component's event(s) suspending state is ignored by Controllers / Application if handlers are attached via controller's controll() method.

    Steps to reproduce the problem:
    • Create any component, let's say Button
    • Attach to it's 'click' event directly via button's on() method, console.log('Direct') in the handler
    • Attach to it's 'click' event via controller's control() method, console.log('Control') in the handler
    • Suspend button's events
    • Click the button
    • See the console output

    The result that was expected:
    • - no output -

    The result that occurs instead:
    • Control

    Test Case:

    Code:
    function test()
    {
        var controller;  
    
        controller = Ext.create('Ext.app.Controller', {
    
            refs : [{
                ref : 'btn',
                xtype : 'button',
                autoCreate : true,
                renderTo : Ext.getBody(),
                text : 'Click me',
                id : 'clickme'
            }],
    
            init : function()
            {
                this.getBtn().on('click', function() { console.log('Direct'); });
    
                this.control({
                    '#clickme' : {
                        'click' : function() { console.log('Control'); }
                    }
                });
            }
        });
    
        controller.init();
    
        controller.getBtn().suspendEvents();
    }
    
    Ext.onReady(test);
    Use the force - read the source.
    My ExtJS extensions can be found here: http://max-bazhenov.com/dev/

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Vote Rating
    751
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,229
    Vote Rating
    114
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    FYI- This is a duplicate of http://www.sencha.com/forum/showthread.php?171525 so I am closing this ticket.

    We have your test case in the tracker still though, so thanks for the thorough submission!
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  4. #4
    Ext JS Premium Member mcouillard's Avatar
    Join Date
    Jun 2008
    Location
    Bucks County, PA
    Posts
    102
    Vote Rating
    7
    mcouillard is on a distinguished road

      0  

    Default


    Bump. Usage of control: {} is the preferred method of handling events in MVC. That's all we try to use. This bug is a big hindrance.

    Tested on 4.1.2a

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar