[Laszlo-dev] escaped code in live examples

John Sundman jsundman at laszlosystems.com
Tue Oct 23 19:51:57 PDT 2007


Under the old doctools regime, the example code was embedded in the  
doc files; in the new regime the examples are pulled out as separate  
lzx files.

Being paranoid, when I converted files to the new syntax, I just  
commented out the examples rather than deleting them.  So, there are  
lots of places where examples still remain in the source, but are  
commented out and thus invisible.  It's dead text.

We should probably go ahead and delete the commented-out code now.   
Let's discuss (but not tonight, it's late).

jrs

On Oct 23, 2007, at 12:40 PM, Lou Iorio wrote:

> 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>
> &lt;canvas debug="true" height="150"&gt;
>   &lt;handler name="oninit"&gt;&lt;![CDATA[
>     for (var i = 0; i &gt; 10; i ++) {
>       canvas.width();
>     }
>   ]]&gt;&lt;/handler&gt;
> &lt;/canvas&gt;
> </code></programlisting><programlisting>
> &lt;canvas debug="true" height="150"&gt;
>   &lt;handler name="oninit"&gt;&lt;![CDATA[
>     for (var i = 0; i &gt; 10; i ++) {
>       canvas.width();
>     }
>   ]]&gt;&lt;/handler&gt;
> &lt;/canvas&gt;
> </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?>



More information about the Laszlo-dev mailing list