beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie O'Neil <>
Subject control inheritance and client initializers
Date Thu, 10 Nov 2005 17:17:16 GMT

  I've run into this entertaining problem with inheritance of controls
and generation of the ClientInitializer file.

  The situation is this:

class Super {
  private EchoControl _echocontrol;

  protected String echo(String echoText) {
    return _echoControl.echo(echoText);

class Sub extends Super {
  // note, no controls are used here, but the super.echo("") method is called

The Super class declares a private control and exposes it through a
protected method.  The Sub class declares no controls but uses the
protected method.  In this case, the Super class's _echoControl field
is never instantiated because the Sub class doesn't have a

The problem is that the Sub class's ClientInitializer is only
generated when the control usage in a superclass is either public or
protected.  Seems that this should also include private controls as
they might still be exposed to subclasses through methods.

Personally, it seems like we should fix this -- any dissenting opinions?


View raw message