On Thu, Nov 20, 2008 at 07:18:11PM +0100, Peter Ertl wrote:
> for SubPanel the ctor is called that order
>
> - ....
> - Panel
> - BasePanel
calls MarkupContainer.add()
calls SubPanel.onComponentAdd() (before SubPanel ctor!)
> - SubPanel
>
> so the fields will be initialized, eh?!
>
>
> Am 20.11.2008 um 16:32 schrieb John Krasnay:
>
> >Here's the problem (also with sketchy pseudo code :)
> >
> >public class BasePanel extends Panel {
> > public BasePanel(String id) {
> > super(id);
> > add(new Label("foo", ...));
> > }
> >}
> >
> >public class SubPanel extends BasePanel {
> > @Override
> > public void onComponentAdd(Component child) {
> > // oops, called from BasePanel ctor
> > // my fields aren't initialized yet
> > }
> >}
> >
> >jk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]