Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-2233 in a recent build.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    15
    Vote Rating
    0
    f_li is on a distinguished road

      0  

    Default [RC1] Ext.dataview.List class onItemTrigger function has wrong signature

    [RC1] Ext.dataview.List class onItemTrigger function has wrong signature


    By inspecting the arguments array passed to this function, you can tell the
    signature (parameter list) onItemTrigger: function(me, index, target, record, e) is not correct.

    The code in Beta 3:

    onItemTrigger: function(container, target, index, e)

    is correct.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,735
    Vote Rating
    756
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The onItemTrigger method is a listener of the itemtap event on the list. The arguments in the itemtap event have changed so the arguments in the onItemTrigger method are correct.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    15
    Vote Rating
    0
    f_li is on a distinguished road

      0  

    Default Problems with this thread

    Problems with this thread


    There are several reply to this thread which are deleted. The last replay I got is from

    TommyMaintz has just replied to a thread you have subscribed to entitled - [CLOSED] [RC1] Ext.dataview.List class onItemTrigger function has wrong signature - in the Sencha Touch 2.x: Bugs forum of Sencha Forum.

    This thread is located at:
    http://www.sencha.com/forum/showthre...e&goto=newpost

    Here is the message that has just been posted:
    ***************
    This looks like it could be a bug. The fireEvent seems to not pass the record. We'll make sure to look into this and get back to you.

    Thanks for the report.

  4. #4
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    The signature is correct for the current triggerEvent default. What triggerEvent are you using?

    Sencha Inc

    Jamie Avins

    @jamieavins

  5. #5
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    So my guess is you have a triggerEvent such as 'tap' or 'singletap'. The RC release changed this to 'itemtap', but it looks like the documentation wasn't updated. I also see we don't have an 'itemsingletap' event available for those that need it. So I have added 'itemsingletap' and updated the documentation to show that the valid options are 'itemtap', 'itemsingletap', 'itemdoubletap', 'itemswipe', and 'itemtaphold'.

    Sencha Inc

    Jamie Avins

    @jamieavins

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    15
    Vote Rating
    0
    f_li is on a distinguished road

      0  

    Default


    I did not register any event handler other than the ones registered by the default List class.
    I only know the onItemTrigger is invoked when I click on an item in the list.

    This may be related to the thread

    http://www.sencha.com/forum/showthre...787#post741787

    Since I have to call this

    me.container.on(me.getTriggerEvent(), me.onItemTrigger, me);

    to get the onItemTrigger invoked when the list is clicked, my guess is that the event is fired by the container of the list instead of the list itselt, and the event signatures of two are different.

  7. #7
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Quote Originally Posted by f_li View Post
    I did not register any event handler other than the ones registered by the default List class.
    I only know the onItemTrigger is invoked when I click on an item in the list.

    This may be related to the thread

    http://www.sencha.com/forum/showthre...787#post741787

    Since I have to call this

    me.container.on(me.getTriggerEvent(), me.onItemTrigger, me);

    to get the onItemTrigger invoked when the list is clicked, my guess is that the event is fired by the container of the list instead of the list itselt, and the event signatures of two are different.
    Pretty sure it's the same issue. The author of that UX will need to update it.

    Sencha Inc

    Jamie Avins

    @jamieavins

  8. #8
    Sencha User
    Join Date
    Feb 2012
    Posts
    15
    Vote Rating
    0
    f_li is on a distinguished road

      0  

    Default


    I don't know what you mean by UX. The SidebarList is our class. It just extends the standard List class with some configuration. The code is shown in the other thread:

    http://www.sencha.com/forum/showthre...787#post741787

  9. #9
    Sencha User
    Join Date
    Feb 2012
    Posts
    15
    Vote Rating
    0
    f_li is on a distinguished road

      0  

    Default


    In the GPL release sencha-touch-debug-all.js file

    line 58546 (of class Ext.dataview.element.Container)
    onItemTap: function(e) {
    var me = this,
    target = e.getTarget(),
    index = me.getViewItems().indexOf(target);


    me.fireEvent('itemtap', me, Ext.get(target), index, e);
    },

    line 58546 (of class Ext.dataview.element.Container)
    The event is handled by the code at line 69591 (of class Ext.dataview.List)
    onItemTrigger: function(me, index, target, record, e) {
    if (!(this.getPreventSelectionOnDisclose() && Ext.fly(e.target).hasCls(this.getBaseCls() + '-disclosure'))) {
    this.callParent(arguments);
    }
    },

    You can see the 2 have different argument list - the position of target and index parameters are switched.




  10. #10
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    You are confusing the DataView's Container event with DataView's own event. The signature is correct for the scope it is running in (the DataView/List itself).

    Sencha Inc

    Jamie Avins

    @jamieavins

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