DeckPanel change from 1.0.21 to 1.1.0

11 views
Skip to first unread message

Sashi

unread,
Aug 15, 2006, 1:10:19 PM8/15/06
to Google Web Toolkit
Looks like the behavior of DeckPanel changed fundamentally. The
following piece of code worked in 1.0.21...

DeckPanel dp = new DeckPanel();
HorizontalPanel hp = new HorizontalPanel();

dp.add(hp);
dp.add(hp); // Just for fun
dp.showWidget(1); // Worked fine in 1.0.21

But in 1.1.0 the last line throws an exception. The reason being that
the underlying insert in ComplexPanel does the following check

if (w.getParent() == this)
return;

The above example is a little lame but the impact of the bevaiour is
felt in TabPanel (which uses a DeckPanel to show and hide the right
widget depending on the tab selected) where one might want to reuse the
same widget for a different tab. This worked in 1.0.21 but everything
breaks in 1.1.0. Maybe the documentation could say that the tabs
inserted for a tab panel have to be unique.

Reply all
Reply to author
Forward
0 new messages