1. #1
    Ext User
    Join Date
    Apr 2008
    Location
    France
    Posts
    13
    Vote Rating
    0
    lioledingue is on a distinguished road

      0  

    Default [FIXED] Bug in ButtonBar.remove(Button) ?

    [FIXED] Bug in ButtonBar.remove(Button) ?


    Hello,

    I'm having an issue regarding to the remove() method in the ButtonBar widget.
    When I'm trying to remove a button, then I add another one instead, I'v got the following error message :
    Code:
    java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
    In debug mode, I saw that after removing a button in the ButtonBar class, the button is not actually removed in the AbstractContainer.items List...

    Is this a bug or something I've done wrong ?
    Any help would be appreciated.

    Thanks !

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    The containers, including button bar, have been updated. The changes are only in SVN, and will go out in the next rev.

    There is what button bar remove looks like now:

    Code:
      public boolean remove(Button button) {
        boolean removed = super.remove(button);
        if (removed) {
          button.removeListener(Events.Select, listener);
          button.removeListener(Events.BeforeSelect, listener);
          panel.remove(button);
        }
        return removed;
      }
    If you have problems after beta3, please post again to this thread.

  3. #3
    Ext User
    Join Date
    Apr 2008
    Location
    France
    Posts
    13
    Vote Rating
    0
    lioledingue is on a distinguished road

      0  

    Default


    Okay, thx

  4. #4
    Ext User
    Join Date
    Apr 2008
    Location
    France
    Posts
    13
    Vote Rating
    0
    lioledingue is on a distinguished road

      0  

    Default [BETA3] Still bug in ButtonBar.remove()

    [BETA3] Still bug in ButtonBar.remove()


    The bug is still there on beta3.
    Here's the error log message :

    Code:
     
    [ERROR] component is not a child of this container
    java.lang.RuntimeException: component is not a child of this container
     at com.extjs.gxt.ui.client.widget.Container.remove(Container.java:414)
     at com.extjs.gxt.ui.client.widget.Container.removeAll(Container.java:444)
     at com.extjs.gxt.ui.client.widget.Container.removeAll(Container.java:198)...
    Thanx
    Lionel

  5. #5
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    I tested and added unit tests to validate. Fix is in SVN.

Thread Participants: 1