Results 1 to 8 of 8

Thread: DataView.beforeselect event is never actually fired

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-543 in a recent build.
  1. #1
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862

    Default DataView.beforeselect event is never actually fired

    In 1.0.1a there is a beforeselect event in DataView.

    However, if you look at the source code, there is no place that beforeselect is ever actually fired.

    This is tangentially mentioned in these bugs:
    http://www.sencha.com/forum/showthre...t=beforeselect
    http://www.sencha.com/forum/showthre...t=beforeselect

    However, it is not the focus of those bugs so I wanted to make sure this issue is addressed.

    Edit: Changed NestedList to DataView when I realized NestedList was failing because the events are supposed to be bubbling up out of List into it and there are no beforeselect events being fired.

  2. #2
    Touch Premium Member
    Join Date
    May 2011
    Posts
    38

    Default

    Is this bug fixed? on 1.1.0, List and NestedList beforeselect seem to never get fired either.

  3. #3
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862

    Default

    Unfortunately, no, at least not as far as SVN (which, I've been told, is apparently not the latest dev version but so far no one will tell me how to access git even though I'm a paid subscriber).

    In sencha-touch-debug.js, these are the only mentions of beforeselect:

    Code:
    33981:        // should we also check beforeselect?
    
    35093:
            this.addEvents(
             ...
                "beforeselect"
            );
    
    38282:
                bubbleEvents: [
                    ...
                    'beforeselect',

  4. #4
    Touch Premium Member
    Join Date
    May 2011
    Posts
    38

    Default

    right, I wished Sencha team could respond to bug reports as confirmed, being worked on, etc. Is there a bug tracker software that's accessible to sencha users? probably better than using this forum.

  5. #5
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862

    Default

    No. In theory, if you're a premium subscriber you get accesss to the "latest and greatest" code in SVN. But unfortunately I've recently discovered that's not exactly the case. They use git internally and only push to SVN every so often. The code sitting in SVN right now is over two months old.

    (Oh, just saw your reply to my other post in the premum forum, but I'll leave this answer here so non-premium users will have access.)

  6. #6
    Ext JS Premium Member
    Join Date
    Feb 2009
    Location
    London, UK
    Posts
    31

    Default still not fixed?!

    Bump. This was reported in January and it's STILL not fixed? Come on! This is lame. I'm trying to implement disabling of Ext.List items (not officially supported), and this bug is biting, since I'll need to say that my disabled items can't be selected.

    Can a Sencha dev at least confirm that this will be fixed in 2.0.0?

  7. #7

    Default Possible solution: Ext.DataView.override

    I'm not sure this is what it was supposed to do but it does the trick for me.

    I tracked down the beforeselect event and ended up in Ext.Dataview. I've included an override below for the onTap function. It now includes the component, index, item and event as well, as opposed to just the component only, as the documentation says.

    Cheers,
    D.

    Code:
    Ext.DataView.override({
        // overidden to add the beforeselect event
        onTap: function(e) {
            var item = this.findTargetByEvent(e),
                index = item ? this.indexOf(item) : false; 
    
    
            if (this.fireEvent("beforeselect", this, index, item, e) ) {
                if (item) {
                    Ext.fly(item).removeCls(this.pressedCls);
                    if (this.onItemTap(item, index, e) !== false) {
                        this.fireEvent("itemtap", this, index, item, e);
                    }
                }
                else {
                    if(this.fireEvent("containertap", this, e) !== false) {
                        this.onContainerTap(e);
                    }
                }
            }
        }
    });

  8. #8
    Sencha - Engineering Operations mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    221

    Default

    corrected bug id is TOUCH-543

Similar Threads

  1. [OPEN-671] 1.0.2 - cardswitch event no longer fired?
    By mherger in forum Sencha Touch 1.x: Bugs
    Replies: 1
    Last Post: 17 Dec 2010, 1:21 AM
  2. Replies: 1
    Last Post: 21 Sep 2010, 8:39 AM
  3. Click event not fired in DataView
    By vnug in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Jul 2008, 9:39 PM
  4. Replies: 1
    Last Post: 12 Mar 2008, 1:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •