1. #1
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default Event handling broken in Beta 3

    Event handling broken in Beta 3


    I used the Rotate Text component for testing (but you can use any other component).

    js\nightly\examples\draw\Rotate Text.html

    Run this code:

    Code:
    var snappy = Ext.getCmp('snappy');
    snappy.fireEvent('test', snappy);
    Event handling works differently between B2 and B3.

    Return value:

    Beta 2: true
    nightly: undefined

    I think this has something to do with this code introduced in Beta 3:

    Code:
    Ext.define('Ext.util.Observable', {
    
        constructor: function(config) {
            ...
            // Hash of event "hasListeners" flags.
            // For repeated events in time-critical code, the firing code should use
            // if (!me.hasListeners.beforerender || me.fireEvent('beforerender', me) !== false) { //code... }
            // Bubbling the events counts as one listener.
            // The subclass may have already initialized it.
            me.hasListeners = me.hasListeners || {};
            ...
        },
        ....

  2. #2
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    I see... this is a feature to improve performance... quite a change though.

    hasListener (singular form) would be a better name since we are checking a particular listener, not listeners.

    *** EDIT
    There's already a method hasListener, so the name of the hash object must be hasListeners.

    I guess the hasListener method can now be deprecated.

  3. #3
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    Hmm... no comment? This is an API change and it will break some applications.

    The Observable.fireEvent method according to the doc returns false if any of the handlers return false otherwise it returns true


    But the nightly code returns undefined if there's no listener for the fired event.


  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    We are checking an event, not a particular listener.

    We are checking whether an event has listeners

    It is not an intentional API change, it's an introduced bug which broke the API.

    If there are any listeners they will be called and any that return false will cause a false to be returned.

    If there are no listeners, it will return undefined. And that is a bug. I'll create a ticket.

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    EXTJSIV-5417

  6. #6
    Touch Premium Member
    Join Date
    Jan 2008
    Location
    Quebec, Canada
    Posts
    122
    Vote Rating
    1
    nbourdeau is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    EXTJSIV-5417
    Hi, I have a licence with you guys with SVN access but I don't seem to see the latest bug fixes and nightly builds ...
    Am I missing something ?

  7. #7
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,589
    Vote Rating
    322
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Nightly builds should be downloadable through the support portal. I know this is working fine for most people. There should be a link top-left of the UI. If you can't see it then make sure your browser isn't caching an old version of the page. If that doesn't fix it you'll need to contact Sencha to find out why you haven't been given access.

  8. #8
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,311
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default


    Quote Originally Posted by nbourdeau View Post
    Hi, I have a licence with you guys with SVN access but I don't seem to see the latest bug fixes and nightly builds ...
    Am I missing something ?
    This bug is very easy to work around, just use hasListeners:

    Code:
    Ext.define('Ext.util.Observable', {
        ...
        constructor: function(config) {
            var me = this;
    
            Ext.apply(me, config);
    
            // Hash of event "hasListeners" flags.
            // For repeated events in time-critical code, the firing code should use
            // if (!me.hasListeners.beforerender || me.fireEvent('beforerender', me) !== false) { //code... }
            // Bubbling the events counts as one listener.
            // The subclass may have already initialized it.
            me.hasListeners = me.hasListeners || {};
            ....

  9. #9
    Sencha User
    Join Date
    Jul 2011
    Posts
    48
    Vote Rating
    1
    dcoan604 is on a distinguished road

      0  

    Default Is there a working override for this issue?

    Is there a working override for this issue?


    I just downloaded 4.1b3 to see how much of my current app would be effected....

    Since I use the controller.control() method to attach listeners.... my whole app doesn't work.
    I can add listeners and Ext.emptyFn to every component...but that ain't gonna happen.

    Is there an override to handle this bug until the next beta release comes?

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi