1. #1
    Sencha User dewil_de's Avatar
    Join Date
    Mar 2012
    Posts
    28
    Vote Rating
    3
    dewil_de is on a distinguished road

      0  

    Default Unanswered: container removeAll only removes last added containerBlock

    Unanswered: container removeAll only removes last added containerBlock


    Hey,

    I've run into a problem and don't really see a good way out.

    I have a container (vbox) which i populate with another container (dateBlock flex: 1).
    i do this by container.add(dateblock instance).
    When a user clicks a button i want to clear the container and refill it with new dateBlock instances.
    But when i do container.removeAll it only removes the last added item.

    I've tried things like getting all the innerItems and destroying them but that doesn't work either.
    Is there something i'm missing here?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    Answers
    3566
    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


    I use removeAll and it removes everything. I would set a breakpoint on the removeAll and walk through the code.
    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 dewil_de's Avatar
    Join Date
    Mar 2012
    Posts
    28
    Vote Rating
    3
    dewil_de is on a distinguished road

      1  

    Default


    Thx for taking your time to look into the problem.

    But i had already solved it, i had declared a itemId on my dateBlock element.

Thread Participants: 1

Tags for this Thread