scripting-tutorial-$3.lzx

<canvas width="100%" height="100">
  <simplelayout axis="y" spacing="5"/>
  <text id="sometext"/>
  <text id="badtext"/>
  <text id="goodtext"/>
  <text id="bettertext"/>
  <script>
    var first = 4;
    var second = 3;
    var result = first + second;
    sometext.setAttribute("text", result);
    badtext.setAttribute("text", first + " plus " + second + " is " + first + second);
    goodtext.setAttribute("text", first + " plus " + second + " is " + (first + second));
    bettertext.format("%s plus %s is %s", first, second, first + second);
  </script>
</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

Named Instances