Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-4924 in Touch 2.3.1 (38).
  1. #1
    Sencha User
    Join Date
    Aug 2007
    Posts
    7
    Vote Rating
    0
    osolo is on a distinguished road

      0  

    Default Possible bug in NestedList.updateStore()

    Possible bug in NestedList.updateStore()


    In NestedList, in the function updateStore, we see this code:

    Code:
            if (newStore) {
                me.goToNode(newStore.getRoot());
                newStore.on(listeners);
            }
    The line me.goToNode(..) indirectly causes the store's 'load' to be called. However, since the listeners aren't set up yet, we don't see the loading mask.

    Is this a bug (i.e. should those two lines be reversed) or is it deliberate? If it's deliberate, then what is the purpose of only setting up the listeners after?

    Thanks!

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,928
    Vote Rating
    129
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    I believe this is on purpose. On dynamic views like, lists that update when the store data changes, you probably don't want the loading mask to appear each time the store updates.
    Though I must admit that I did not find any methods that called this private method.
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

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

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

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha User
    Join Date
    Aug 2007
    Posts
    7
    Vote Rating
    0
    osolo is on a distinguished road

      0  

    Default


    I agree that you don't want to see the loading mask on every item change. But to the best of my understanding updateStore() is used to change the entire store, in which case the mask should be displayed and the events should fire.

  4. #4
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,928
    Vote Rating
    129
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.
    I will pass this along to Engineering and let them make the final call.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    updateStore will indeed only be called when you change the entire store bound to the NestedList, thus adding the listeners before starting to load the store seems like a good idea

    I have changed this for the next release. Thanks for the report.

Thread Participants: 2