You found a bug! We've classified it as TOUCH-1374 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member Artistan's Avatar
    Join Date
    Apr 2007
    Location
    MN
    Posts
    144
    Vote Rating
    0
    Artistan is on a distinguished road

      0  

    Default Control function configuration not triggering event SHOW for listview.

    Control function configuration not triggering event SHOW for listview.


    REQUIRED INFORMATION


    Ext version tested:


    Browser versions tested against:
    • Chrome (Windows7)
    • iPad (iOS 5)


    Description:
    • control is not working for list show.
    Steps to reproduce the problem:
    • Panel (fit)
    • Textfield (docked top)
    • list (fit)
    • code for control query below.

    The result that was expected:
    • show event should trigger function

    The result that occurs instead:
    • nothing

    Test Case:

    http://visits.benint.net/visits/touch-control/index.html
    Code:
            this.control({
                    'autocomplete #list': {
                        refresh: this.onListRefresh, /* works */
                        show: this.onListShow /* does NOT work */
                    }
                });


    HELPFUL INFORMATION

    See this URL for live test case: http://visits.benint.net/visits/touc...rol/index.html

    Operating System:
    • Windows 7
    • iOS 5

  2. #2
    Ext JS Premium Member Artistan's Avatar
    Join Date
    Apr 2007
    Location
    MN
    Posts
    144
    Vote Rating
    0
    Artistan is on a distinguished road

      0  

    Default


    How can I look at what control events are active?
    Not sure how to debug this.

  3. #3
    Ext JS Premium Member Artistan's Avatar
    Join Date
    Apr 2007
    Location
    MN
    Posts
    144
    Vote Rating
    0
    Artistan is on a distinguished road

      0  

    Default


    Looks like it works occasionally. Need to check timing?

  4. #4
    Ext JS Premium Member Artistan's Avatar
    Join Date
    Apr 2007
    Location
    MN
    Posts
    144
    Vote Rating
    0
    Artistan is on a distinguished road

      0  

    Default


    CURRENTLY
    Looking at the controller controls...

    Code:
    myA.control
    
    function (selectors, listeners) {         this.application.control(selectors, listeners, this);     }
    
    Calls the application control function
    Code:
    
    myA.application.control
    function (selectors, listeners, controller) {
            var dispatcher = this.getEventDispatcher(),
                selector, eventName, listener;
    
            for (selector in selectors) {
                if (selectors.hasOwnProperty(selector)) {
                    listeners = selectors[selector];
    
                    for (eventName in listeners) {
                        if (listeners.hasOwnProperty(eventName)) {
                            listener = listeners[eventName];
    
                            dispatcher.addListener('component', selector, eventName, listener, controller);
                        }
                    }
                }
            }
        }
    Which in turn calls the event dispatcher doAddListener
    Code:
    
    myA.getEventDispatcher
    function () {
            if (!this.eventDispatcher) {
                this.eventDispatcher = Ext.event.Dispatcher.getInstance();
    
                this.getEventDispatcher = this.getOptimizedEventDispatcher;
            }
    
            return this.eventDispatcher;
        }
    var myD = myA.getEventDispatcher()
    undefined
    myD.addListener
    function (targetType, target, eventName) {
            var publishers = this.getActivePublishers(targetType, eventName),
                ln = publishers.length,
                i;
    
            if (ln > 0) {
                for (i = 0; i < ln; i++) {
                    publishers[i].subscribe(target, eventName);
                }
            }
    
            return this.doAddListener.apply(this, arguments);
        }
    myD.doAddListener
    function (targetType, target, eventName, fn, scope, options, order) {
            var listenerStack = this.getListenerStack(targetType, target, eventName, true);
    
            return listenerStack.add(fn, scope, options, order);
        }
    So it is possible, if the format were more dynamic, that we could pass options on to the listener.
    It would me updating ...application.control to accept a more dynamic input.
    Maybe something like..

    Code:
    // Example of what I would like to be able to do....
    this.control( {
                "ben_cnt_visit": {
                    activate: this.onVisitActivate,
                    show: this.onShow,
                    buffer: 500
                },
                "ben_cnt_visit2": {
                    activate: this.onVisitActivate2,
                    show: this.onShow2,
                    buffer: 1000
                },
                ...
    });
    OR

    Code:
    // Example of what I would like to be able to do....
    this.control( {
                "ben_cnt_visit": [
                    {
                        event: 'activate',
                        fn: this.onVisitActivate,
                        buffer: 500,
                        scope: ...,
                        ...
                    },
                    {
                        event: 'show',
                        fn: this.onShow,
                        buffer: 1000,
                        scope: ...,
                        ...
                    }
                ],
                "ben_cnt_visit": [
                    {
                        event: 'activate',
                        fn: this.onVisitActivate2,
                        buffer: 1500,
                        scope: ...,
                        ...
                    },
                    {
                        event: 'show',
                        fn: this.onShow2,
                        buffer: 2000,
                        scope: ...,
                        ...
                    }
                ],
    });
    .

  5. #5
    Sencha - Sencha Touch Dev Team Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    14
    Jacky Nguyen has a spectacular aura about Jacky Nguyen has a spectacular aura about

      0  

    Default


    We'll look into this. However it would be much more helpful if you could help providing us a much more simplified test case.
    Sencha Touch Lead Architect

  6. #6
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    I think the problem you are having is you have a listener for the 'show' event on your list, but you are actually hiding/showing a container of the list, not the list itself. You can get around this by using the 'painted' event instead.

    If not, I cannot reproduce this in the latest code. Please create a smaller testcase and I'll look into it for you.

    Thanks!
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 2

Tags for this Thread

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..."