pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan cheng <ccp...@hotmail.com>
Subject Remove component from Accordion
Date Sun, 08 Jan 2012 03:43:17 GMT

Hi,
I was trying to remove a component from an Accordion but failed.After a trace, I found your
code in Accordion class as
  @Override
    public Sequence<Component> remove(int index, int count) {
        for (int i = index, n = index + count; i < n; i++) {
            Component component = get(i);


            if (panels.indexOf(component) >= 0) {
                throw new UnsupportedOperationException();
            }
        }


        // Call the base method to remove the components
        return super.remove(index, count);
    }
which if the component index to be removed is greater than or equal to zero will throw a UnsupportedOperationException.Is
that mean, we can't remove component from accordion or it is a bug?
Regards,
Brendan 		 	   		  
Mime
View raw message