[Laszlo-dev] escaped code in live examples
Lou Iorio
liorio at laszlosystems.com
Tue Oct 23 09:40:11 PDT 2007
What is the purpose of the escaped code in live examples?
In the debug chapter (example 50.2) we have this:
<<example role="live-example">
<title>Runtime exceptions printed once per line</title>
<programlisting language="lzx">
<textobject><textdata fileref="programs/debugging-$3.lzx"/></
textobject>
</programlisting>
</example>
<?informalexample role="live-example"><programlisting role="lzx-
embednew"><filename>debugging-$3.lzx</filename><parameter/><code>
<canvas debug="true" height="150">
<handler name="oninit"><![CDATA[
for (var i = 0; i > 10; i ++) {
canvas.width();
}
]]></handler>
</canvas>
</code></programlisting><programlisting>
<canvas debug="true" height="150">
<handler name="oninit"><![CDATA[
for (var i = 0; i > 10; i ++) {
canvas.width();
}
]]></handler>
</canvas>
</programlisting><?lzx-edit programs/debugging-$3.lzx></
informalexample?>
As far as I can tell, this does exactly the same thing:
<example role="live-example">
<title>Runtime exceptions printed once per line</title>
<programlisting language="lzx">
<textobject><textdata fileref="programs/debugging-$3.lzx"/></
textobject>
</programlisting>
</example>
<?informalexample role="live-example"><programlisting role="lzx-
embednew"><filename>debugging-$3.lzx</filename><parameter/><code>
</programlisting><?lzx-edit programs/debugging-$3.lzx></
informalexample?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20071023/64de26ff/attachment-0001.html
More information about the Laszlo-dev
mailing list