class-inheritance-$29.lzx

<canvas debug="true" height="200" width="100%">
  <debug x="155"/>
  <class name="container" defaultplacement="red">
    <!-- setting subnode's parent to be the same as immediateparent -->
    <method name="determinePlacement" args="subnode, place, args">
      var p = super.determinePlacement(subnode, place, args);
      subnode.parent = p;
      return p;
    </method> 
    <view name="blue" bgcolor="blue" width="100" height="100">
      <view name="red" bgcolor="red" width="150" height="150"/>
    </view>
  </class>
  <container name="thetop">
    <view name="yellow" bgcolor="yellow" width="50" height="50">
      <handler name="oninit">
        Debug.debug("parent: %w", this.parent);
        Debug.debug("immediateparent: %w", this.immediateparent);
      </handler>
    </view>
  </container>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc.  All Rights Reserved.                   *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References

Classes

Named Instances