Author: dda
Date: 2008-01-31 15:25:39 -0800 (Thu, 31 Jan 2008)
New Revision: 7941
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/trunk/docs/src/reference/langref.xml
openlaszlo/trunk/docs/src/reference/wrappers.xml
Log:
Change 20080131-dda-2 by [EMAIL PROTECTED] on 2008-01-31 12:16:43 EST
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: doc: update recommendations on splash page; fix some examples, fix doc
build problem.
New Features:
Bugs Fixed: LPP-5280
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)
Documentation:
Release Notes:
Details:
Some miscellany doc issues:
Update the <splash> page to include the advice given by Max.
LzSprite: fixed an errant javadoc comment that keeps doc from building!
LzSprite is not public but its javadoc is still parsed. So this does not
effect doc output.
Added multiline=true to <p> example.
Fixed typo in <p>.
<frame>, <event>, <handler>, <method> fixed non-live examples,
which were not shown before.
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-01-31
23:25:15 UTC (rev 7940)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-01-31
23:25:39 UTC (rev 7941)
@@ -903,7 +903,7 @@
* 100px square) to the view, you would normally just set its scale
* to the view dimension (see note at LzSprite#width), but you have
* to also invert its parent's scale (which is a percent) hence the
- * (100 / <parent scale>) factor.
+ * (100 / <parent scale>) factor.
*/
LzSprite.prototype._setButtonSize = function ( axis , bsize ){
var sc ="_" + ( axis =="width" ? "x" : "y" ) + "scale" ;
Modified: openlaszlo/trunk/docs/src/reference/langref.xml
===================================================================
--- openlaszlo/trunk/docs/src/reference/langref.xml 2008-01-31 23:25:15 UTC
(rev 7940)
+++ openlaszlo/trunk/docs/src/reference/langref.xml 2008-01-31 23:25:39 UTC
(rev 7941)
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<js2doc>
@@ -182,23 +182,29 @@
<p>To specify an event handler in an object-creation tag, simply include it
like any other attribute. For example,</p>
-<example extract="false"><programlisting class="code">
+<!-- TODO: [2008-01-28 dda] handle <example extract="false"> in XSL.
+ This was: <example extract="false"><programlisting class="code">...
+ but that produces no output. All such examples have been converted,
+ and <programlisting class="code"> has been added when it is missing.
+ -->
+
+<!--<example extract="false">--><programlisting class="code">
<view onmouseover="doSomething()">
<method name="doSomething">
// code to be executed when mouse is over the view
</method>
</view>
-</programlisting></example>
+</programlisting><!--</example>-->
<p>If you use the <tagname link="true">handler</tagname> tag, you do not need
to include the handler in the tag that creates the object.</p>
-<example extract="false"><programlisting class="code">
+<!--<example extract="false">--><programlisting class="code">
<view>
<handler name="onmouseover">
// code to be executed when the mouse is over the view
</handler>
</view>
-</programlisting></example>
+</programlisting><!--</example>-->
<p> The above two examples are functionally equivalent. Using the
<tagname>handler</tagname> tag, however, can often lead to more readable code
because it removes clutter from the object creation tag.</p>
@@ -275,7 +281,7 @@
<p>For example, if a handler is defined via:</p>
-<example extract="false">
+<!--<example extract="false">--><programlisting class="code">
<view id="obj">
<hander name="onkeydown" args="kc">
if (kc == 13) this.doAction()
@@ -284,7 +290,8 @@
Debug.write("action");
</method>
</view>
-</example>
+</programlisting>
+<!--</example>-->
<p>
then script code
@@ -300,7 +307,7 @@
<p>
If the @method attribute is given, a method body is unnecessary and the named
method will be invoked instead. For example, the handler below has the same
behavior as the earlier example.</p>
-<example extract="false">
+<!--<example extract="false">--><programlisting class="code">
<view id="obj">
<hander name="onkeydown" method="doAction"/>
<method name="doAction" args="kc">
@@ -308,7 +315,8 @@
Debug.write("action");
</method>
</view>
-</example>
+</programlisting>
+<!--</example>-->
</text>
@@ -488,13 +496,14 @@
allows the method to be invoked from JavaScript with this name.
For example, if a method is defined via:</p>
-<example extract="false">
+<!--<example extract="false">--><programlisting class="code">
<view id="obj">
<method name="f" args="a, b">
return a+b;
</method>
</view>
-</example>
+</programlisting>
+<!--</example>-->
<p>
then script code
@@ -544,6 +553,23 @@
<tag name="shortdesc"><text>Controls the presentation while the
application is loading.</text></tag>
<tag name="lzxname"><text>splash</text></tag>
<text>
+ <note>The <tagname>splash</tagname> tag does not work across
+ all platforms. Consider instead the following technique:
+ <!-- Note: does not work as a live example -->
+ <programlisting><![CDATA[
+<div id="lzsplash" style="z-index: 10000000; top: 0; left: 0; width: 100%;
height: 100%; position: fixed; display: table">
+ <p style="display: table-cell; vertical-align: middle;">
+ <img src="/trunk/lps/includes/spinner.gif" style="display: block; margin:
20% auto"/>
+ </p>
+</div>
+<script type="text/javascript">
+ Lz.dhtmlEmbed({url: 'copy-of-hello.lzx?lzt=object&lzr=dhtml', bgcolor:
'#ffffff', width: '100%', height: '100%', id: 'lzapp'});
+ Lz.lzapp.onload = function loaded() {
+ var s = document.getElementById('lzsplash');
+ if (s) LzSprite.prototype.__discardElement(s);
+ }
+</script>]]></programlisting>
+ </note>
<p>The <tagname>splash</tagname> tag controls the presentation while
the application is loading.</p>
@@ -551,11 +577,12 @@
progress bar is displayed while the application is loading. For
example:</p>
-<example extract="false">
+<!--<example extract="false">--><programlisting class="code">
<canvas>
<splash/>
<canvas>
-</example>
+</programlisting>
+<!--</example>-->
<p>The <tagname link="true">splash</tagname> element may contain
<a href="tag.splash-view.html">"splash view"</a> elements to define the
position and
@@ -565,13 +592,14 @@
<p>
For example, the following program positions an image on the canvas during the
"splash" loading portion of the program's execution and removes it once the
application has loaded. The example below executes too quickly to be demonsrate
the splash view; try it in a larger application to see how it works.</p>
-<example extract="false" title="using 'splash view' tag">
+<!--<example extract="false" title="using 'splash view'
tag">--><programlisting class="code">
<canvas height="100">
<splash>
<view resource="../images/logo.png"/>
</splash>
</canvas>
-</example>
+</programlisting>
+<!--</example>-->
<p>
You can position more than one image by specifying its coordinates. The
<attribute>persistent</attribute> attribute on <tagname>splash</tagname> tag
causes the "splash" views contained within the spash element to remain on the
canvas once the
load process is complete.</p>
@@ -712,4 +740,4 @@
</doc>
</property>
-</js2doc>
\ No newline at end of file
+</js2doc>
Modified: openlaszlo/trunk/docs/src/reference/wrappers.xml
===================================================================
--- openlaszlo/trunk/docs/src/reference/wrappers.xml 2008-01-31 23:25:15 UTC
(rev 7940)
+++ openlaszlo/trunk/docs/src/reference/wrappers.xml 2008-01-31 23:25:39 UTC
(rev 7941)
@@ -23,7 +23,7 @@
<text>A <a href="http://www.openlaszlo.org"
target="_blank">link</a></text>
</canvas>
</example>
->
+
<p>Unlike HTML, the text in the link is not automatically styled. To style
the text, use the <tagname>u</tagname> and <tagname>font</tagname> tags:</p>
<example>
@@ -122,12 +122,12 @@
<tag name="lzxname"><text><p></text></tag>
<text>
-<p>An HTML paragraph. This tag only occur inside XHTML text such as
+<p>An HTML paragraph. This tag only occurs inside XHTML text such as
<tagname>text</tagname>.</p>
<example>
<canvas height="30">
- <text>
+ <text multiline="true">
<p>A pararaph.</p>
<p>Another one.</p>
</text>
@@ -289,12 +289,20 @@
contains several images which can be toggled among by script commands.
For example:</p>
-<example extract="false" title="A resource with two frames">
+<!-- TODO: [2008-01-28 dda] handle <example extract="false"> in XSL.
+ This was: <example extract="false"><programlisting class="code">...
+ but that produces no output. All such examples have been converted,
+ and <programlisting class="code"> has been added when it is missing.
+ -->
+
+<!--<example>-->
+<programlisting class="code">
<resource name="mfr">
<frame src="f1.jpg"/>
<frame src="f2.jpg"/>
</resource>
-</example>
+</programlisting>
+<!--</example-->
<p>
Multiple frame tags can be declared consecutively to produce a single
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins