This issue duplicates another issue.
  1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    63
    Vote Rating
    1
    stevanicus is on a distinguished road

      0  

    Default ComboBox suspendEvents doesn't work

    ComboBox suspendEvents doesn't work


    Ext version tested:
    • Ext 4.1.1-rc2
    Browser versions tested against:
    • FF14
    Description:
    • I am trying to suspend the events of a combobox, set a value in that combobox and resumeevents afterwards
    Steps to reproduce the problem:
    • Create a combobox
    • Add an xtype selector listener in a controller
    • 'mycombobox':{change:mychangefunction}
    The result that was expected:
    • that it wouldnt fire mychangefunction()
    The result that occurs instead:
    • it still fires mychangefunction()
    Code:

    I have an array of comboboxes that I obtained by using .query() on a panel. Then I iterate the through them and set a value in each.

    Code:
    console.info("silent", silent, typeof silent == "boolean")
            
            if(optionsStore && views && viewSelectors){
                
                for(var i = 0, l = viewSelectors.length; i < l; i++){
                    
                    var viewRecord = optionsStore.findRecord("portal", views[i]);
                    
                    if(silent){
                        viewSelectors[i].suspendEvents();
                    }
                    
                    console.info("viewSelectors[i]", viewSelectors[i], viewSelectors[i].eventsSuspended);
                    viewSelectors[i].setValue(viewRecord);    
                    console.info("viewSelectors[i]", viewSelectors[i], viewSelectors[i].eventsSuspended);
                    
                    if(silent){
                        viewSelectors[i].resumeEvents();
                    }
                }
                
            }    
            
            console.info("silent", silent, typeof silent == "boolean")
    The console with viewSelectors[i].eventsSuspended = 1
    Set the change events of viewSelectors[i].setValue(viewRecord);
    are still fired.

    Thanks in advance

  2. #2
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,339
    Vote Rating
    131
    LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all

      1  

    Default


    I believe this might be a duplicate bug report, see this

  3. #3
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    63
    Vote Rating
    1
    stevanicus is on a distinguished road

      0  

    Default


    looks like your right - thanks

Thread Participants: 1

Tags for this Thread