PDA

View Full Version : FX slideIN/OUT problem



hmz
16 Dec 2011, 2:58 AM
hi
i created an accordion composed from content panel and i have added a listener to the head for each content panel to slide in and slide out the contentpanel body the problem is when I click several times in succession on the header it crashes
contentPanel.getHeader().addListener(Events.OnClick, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
if(contentPanel.getBody().isVisible()) {
contentPanel.getBody().slideOut(Direction.UP, FxConfig.NONE);
activeContentPanel = null;
} else {
if(activeContentPanel != null){
activeContentPanel.getBody().slideOut(Direction.UP, FxConfig.NONE);
}
contentPanel.getBody().slideIn(Direction.DOWN, FxConfig.NONE);
activeContentPanel = contentPanel;
}
}
});
sorry for my bad english thanks in advance

hmz
16 Dec 2011, 6:57 AM
the same thing happen in the demo
http://www.sencha.com/examples/#fx
if i click many time on the button slide in /out it crashes