Hybrid View

  1. #1
    Sencha User Surykat's Avatar
    Join Date
    Jul 2011
    Location
    BIALYSTOK, Poland
    Posts
    58
    Answers
    1
    Vote Rating
    1
    Surykat is on a distinguished road

      0  

    Default Answered: [PR2] delete config.listeners - purposeful behavior?

    Answered: [PR2] delete config.listeners - purposeful behavior?


    I have scenario in my app that allows me to open a detailed view multiple times during a itemdoubletap listener of a list. The event shows another view, which have a 'close button' that allows user to get back to list.

    My problem is coused of that I am moving my application from Sencha Touch 1.0 and I have listeners declared in list configuration. The problem what I have observed in PR2 (in PR1 everything was working fine) is that my listeners declared in list configuration are deleted after first assignment to list/view.

    The code is: (in debug version):
    Code:
        constructor: function(config) {
            if (config) {
                if ('listeners' in config) {
                    this.setListeners(config.listeners);
                    delete config.listeners;
                }
    
    
                if ('bubbleEvents' in config) {
                    this.setBubbleEvents(config.bubbleEvents);
                    delete config.bubbleEvents;
                }
            }
    
    
            return this;
        }
    Is it a purposeful behavior and a good behavior to deleting that config? What should I do to avoid further problems with something like this? Couse now, of course, I could comment that lines and problem dissapear. But it is not a solution in case to Yours further releases.

    Is is possible to check original configuration for listeners in component and restoring them if nothing change them during application lifecycle?

  2. In PR2 we made the constructor of Observable mixin to be executed before the constructor of the target class to ensure all given listeners are added before any other config item is initialized. Deleting config.listeners after it's already been processed is merely a performance optimization so that it doesn't get double-processed again when the target class invoke initConfig().

    We are aware of the issue you're encountering as a consequence of this change, when the same config object reference is reused again in multiple instantiation. A temporary workaround is to not use the same config reference while we're looking into a more permanent solution.

  3. #2
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Answers
    24
    Vote Rating
    14
    Jacky Nguyen has a spectacular aura about Jacky Nguyen has a spectacular aura about

      0  

    Default


    In PR2 we made the constructor of Observable mixin to be executed before the constructor of the target class to ensure all given listeners are added before any other config item is initialized. Deleting config.listeners after it's already been processed is merely a performance optimization so that it doesn't get double-processed again when the target class invoke initConfig().

    We are aware of the issue you're encountering as a consequence of this change, when the same config object reference is reused again in multiple instantiation. A temporary workaround is to not use the same config reference while we're looking into a more permanent solution.
    Sencha Touch Lead Architect

Thread Participants: 1

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