Threaded View

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-4023 in a recent build.
  1. #1
    Sencha - Dev Team
    Join Date
    Aug 2012
    Location
    France
    Posts
    23
    Vote Rating
    0
    NiNiX is on a distinguished road

      0  

    Default [2.2.0-alpha] fireEvent returns 'undefined' if no handler.

    [2.2.0-alpha] fireEvent returns 'undefined' if no handler.


    Versions: 2.2.0-alpha (and 2.1.1)
    Browser: Chrome 24 (Win8 / Desktop)
    Severity: normal (workaround: explicitly test fireEvent(...) !== false)
    Attachement: Full test case

    Sencha Touch 2.1 doc says that fireEvent "returns false if any of the handlers return false, otherwise it returns true". If there is no handler attached to the fired event, fireEvent returns 'undefined'. In this case, code checking 'if (fireEvent() == true)', 'if (fireEvent())' or 'if (!fireEvent())' will failed.

    Test case (code extracted from the full test case in attachment)

    App.view.Main
    PHP Code:
    [...]
        
    _fireEvent: function() {
            var 
    res this.fireEvent('click'this);
            
    console.log('fireEvent return:'res);
        }
    [...] 
    App.controller.Main
    PHP Code:
    [...]
        
    config: {
            
    control: {

                
    // [OK] method returns false, fireEvent returns 'false'
                //'main': { click: function() { return false; } },

                // [OK] method returns nothing, fireEvent returns 'true'
                //'main': { click: function() { } }

                // [FAILED] no bound listeners, fireEvent returns 'undefined'.
            
    }
        },
    [...] 
    Attached Files

Thread Participants: 1

Tags for this Thread

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