class-inheritance-$7.lzx

<canvas debug="true" height="200" width="100%">
  <debug height="175"/> 
  <class name="foo">
    <method name="doit">
      Debug.debug("foo: this is [%w]", this);
      Debug.debug("foo: classroot is [%w]", classroot);
      Debug.debug("foo: classroot.classroot is [%w]", classroot.classroot);
    </method>
  </class>
  <!-- boo contains a foo -->
  <class name="boo">
    <foo name="myfoo"/>
  </class>
  <!-- goo contains a boo -->
  <class name="goo">
    <boo name="myboo"/>
    <handler name="oninit">
      myboo.myfoo.doit();
      Debug.debug("-----");
      Debug.debug("goo: this is [%w]", this);
      // error will be displayed -- there is no classroot
      Debug.debug("goo: classroot is [%w]", classroot);
    </handler>
  </class>
  <!-- Make an instance of goo -->
  <goo name="mygoo"/>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007, 2008 Laszlo Systems, Inc.  All Rights Reserved.                   *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References

Classes

Named Instances