We picked up the latest nightly and started seeing a lot of bizarre layout with code that worked fine in earlier builds (252 is the last confirmed good one I'm aware of).
We've seen it with modal windows - the first time opening works fine. But subsequent opens either don't open the window at all or the window opens but controls are missing or placed in strange places.
We've also seen it with section stack controls.
Here is a sample that illustrates the problem. Click the "load" button to create a second "Dictionary" tab with a series of section stack panels. This works fine the first time. Close the tab and click "load" again. A series of section stacks are created - but some seem to missing. And the content inside the stack section is often placed somewhere else. Repeating the close/load cycle shows that things get progressively worse.
We've seen it with modal windows - the first time opening works fine. But subsequent opens either don't open the window at all or the window opens but controls are missing or placed in strange places.
We've also seen it with section stack controls.
Here is a sample that illustrates the problem. Click the "load" button to create a second "Dictionary" tab with a series of section stack panels. This works fine the first time. Close the tab and click "load" again. A series of section stacks are created - but some seem to missing. And the content inside the stack section is often placed somewhere else. Repeating the close/load cycle shows that things get progressively worse.
Code:
public class SmartTest implements EntryPoint { private Button button = new Button("load"); private TabSet set = new TabSet(); public void onModuleLoad() { final VLayout vLayout = new VLayout(); vLayout.setWidth100(); vLayout.setHeight100(); SC.showConsole(); Tab mainTab = new Tab("Main"); mainTab.setCanClose(false); VLayout mTabLayout = new VLayout(); mTabLayout.setHeight100(); mTabLayout.setWidth100(); Label mTabLabel = new Label("Testing"); mTabLayout.addMember(mTabLabel); mainTab.setPane(mTabLayout); set.addTab(mainTab); button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { buildDictionary(); } }); vLayout.addMember(set); vLayout.addMember(button); vLayout.draw(); } protected void buildDictionary() { final HLayout hLayout = new HLayout(); hLayout.setHeight100(); hLayout.setWidth100(); for (int i = 0; i < 5; i++) { SmartGridPanel cPanel = new SmartGridPanel("Panel " + i); hLayout.addMember(cPanel); } Tab dictTab = new Tab("Dictionary"); dictTab.setCanClose(true); dictTab.setPane(hLayout); set.addTab(dictTab); set.selectTab(dictTab); } private class SmartGridPanel extends SectionStack { private VLayout vLayout = new VLayout(); private SectionStackSection section = new SectionStackSection(); public SmartGridPanel(String category) { vLayout.setHeight100(); vLayout.setWidth100(); this.setHeight100(); this.setWidth100(); section.setTitle(category); section.setCanCollapse(false); Label label = new Label(category); vLayout.addMember(label); section.addItem(vLayout); this.addSection(section); } } }
Comment