[Laszlo-checkins] r5644 - in openlaszlo/branches/legals: WEB-INF/lps/lfc/controllers WEB-INF/lps/lfc/data WEB-INF/lps/lfc/helpers WEB-INF/lps/lfc/services WEB-INF/lps/lfc/services/platform/dhtml WEB-INF/lps/lfc/views docs docs/includes docs/src docs/src/contribref docs/src/contributors docs/src/deployers docs/src/developers docs/src/developers/programs docs/src/developers/tutorials docs/src/developers/tutorials/programs docs/src/reference docs/src/wrappers docs/src/xsl lps/components/base lps/components/charts/common lps/components/incubator lps/components/incubator/rich-text lps/components/lz lps/components/lzunit
jgrandy@openlaszlo.org
jgrandy at openlaszlo.org
Wed Jul 11 13:06:20 PDT 2007
Author: jgrandy
Date: 2007-07-11 13:04:01 -0700 (Wed, 11 Jul 2007)
New Revision: 5644
Added:
openlaszlo/branches/legals/docs/src/contribset.dbk
openlaszlo/branches/legals/docs/src/contributors/
openlaszlo/branches/legals/docs/src/contributors/programs/
openlaszlo/branches/legals/docs/src/developers/programs/media-resources-$9.lzx
openlaszlo/branches/legals/docs/src/xsl/dbkpreprocessexamples.xsl
Removed:
openlaszlo/branches/legals/docs/components/
openlaszlo/branches/legals/docs/devdocs.css
openlaszlo/branches/legals/docs/src/contribref/doctools-ref.dbk
openlaszlo/branches/legals/docs/src/contribref/js2doc-ref.dbk
openlaszlo/branches/legals/docs/src/contribref/licenses.dbk
openlaszlo/branches/legals/docs/src/contributors/programs/
openlaszlo/branches/legals/docs/src/wrappers/lz-radiogroup.html
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataElement.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDatapointer.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataset.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzParam.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzCommand.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzURL.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloView.lzs
openlaszlo/branches/legals/docs/includes/docbook.css
openlaszlo/branches/legals/docs/includes/lzx-pretty-print.css
openlaszlo/branches/legals/docs/includes/styles.css
openlaszlo/branches/legals/docs/index.html
openlaszlo/branches/legals/docs/src/build.xml
openlaszlo/branches/legals/docs/src/contribref/index.dbk
openlaszlo/branches/legals/docs/src/deployers/architecture.dbk
openlaszlo/branches/legals/docs/src/deployers/deploy-preface.dbk
openlaszlo/branches/legals/docs/src/deployers/deployers-index.dbk
openlaszlo/branches/legals/docs/src/deployers/logging.dbk
openlaszlo/branches/legals/docs/src/deployers/lps-request-types.dbk
openlaszlo/branches/legals/docs/src/developers/book-info.dbk
openlaszlo/branches/legals/docs/src/developers/browser-integration.dbk
openlaszlo/branches/legals/docs/src/developers/debugging.dbk
openlaszlo/branches/legals/docs/src/developers/developers_guide_preface.dbk
openlaszlo/branches/legals/docs/src/developers/index.dbk
openlaszlo/branches/legals/docs/src/developers/media-resources.dbk
openlaszlo/branches/legals/docs/src/developers/methods-events-attributes.dbk
openlaszlo/branches/legals/docs/src/developers/persistent_connection.dbk
openlaszlo/branches/legals/docs/src/developers/programs/class-1.lzx
openlaszlo/branches/legals/docs/src/developers/programs/debugging-$5.lzx
openlaszlo/branches/legals/docs/src/developers/programs/program-development-$14.lzx
openlaszlo/branches/legals/docs/src/developers/programs/views-$22.lzx
openlaszlo/branches/legals/docs/src/developers/programs/views-$4.lzx
openlaszlo/branches/legals/docs/src/developers/rpc-soap.dbk
openlaszlo/branches/legals/docs/src/developers/rpc.dbk
openlaszlo/branches/legals/docs/src/developers/survey-chapter.dbk
openlaszlo/branches/legals/docs/src/developers/text.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/art_assets.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/calculator.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/classes.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/data.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/drawview-intro.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/laszlo_basics.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/programs/drawview-intro-$3.lzx
openlaszlo/branches/legals/docs/src/developers/tutorials/scripting.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/text.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/views.dbk
openlaszlo/branches/legals/docs/src/developers/tutorials/window.dbk
openlaszlo/branches/legals/docs/src/reference/preface.dbk
openlaszlo/branches/legals/docs/src/userset.dbk
openlaszlo/branches/legals/docs/src/xsl/common-html.xsl
openlaszlo/branches/legals/docs/src/xsl/js2doc-comment2dbk.xsl
openlaszlo/branches/legals/docs/src/xsl/js2doc2dbk.xsl
openlaszlo/branches/legals/docs/src/xsl/lzx-pretty-print.xsl
openlaszlo/branches/legals/docs/src/xsl/parameters.xsl
openlaszlo/branches/legals/lps/components/base/basedatepicker.lzx
openlaszlo/branches/legals/lps/components/base/basedatepickerday.lzx
openlaszlo/branches/legals/lps/components/base/basedatepickerweek.lzx
openlaszlo/branches/legals/lps/components/base/basescrollbar.lzx
openlaszlo/branches/legals/lps/components/base/image.lzx
openlaszlo/branches/legals/lps/components/charts/common/viewspoolmanager.lzx
openlaszlo/branches/legals/lps/components/incubator/draglib.lzx
openlaszlo/branches/legals/lps/components/incubator/rich-text/formatbtn.lzx
openlaszlo/branches/legals/lps/components/lz/radio.lzx
openlaszlo/branches/legals/lps/components/lzunit/lzunit.lzx
Log:
Change 20070709-jgrandyw-I by jgrandyw at jgrandy-mbp.local on 2007-07-09 11:06:35 PDT
in /Users/jgrandyw/dev/svn/openlaszlo/branches/legals
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Many improvements to doc tools and dguide and refguide
New Features:
Bugs Fixed:
LPP-1568 Dataselectionmanager isSelected() has a return value, but is not documented.
LPP-1981 context attribute of datapointer is missing a description
LPP-3385 Dataset reference page shows confusing use of setQueryString()
LPP-3548 Add runtime switch to documentation examples
LPP-3801 improved reference doc for @mask attribute
LPP-3924 Refguide Index entries for members should give parent class name
LPP-3926 Remove links to Designer's guide
LPP-3927 Link to forums from Preface in Reference Guide is incorrect
LPP-3938 Index to 4.0 reference missing several entries for LzFoo(see also foo)
LPP-3941 Create "Users" and "Contributors" sets containing existing books
LPP-4088 Ant doc reports 'build successful' even though a gremlin in a .dbk source file breaks the build
LPP-4089 Many semicolons disappeared from dguide code examples
LPP-4124 LzParam should be a public API
LPP-4125 LzDataElement.lzs should be listed in Files index of RefGuide
LPP-4140 selectionmanager not documented in 4.0.2
LPP-4187 Refguide: missing description for radiogroup
LPP-4262 docs/components is obsolete and should be removed
LPP-4263 Contributor's reference build shows lots of broken links
LPP-4264 Streamline xref's within written documentation
Technical Reviewer: ben
QA Reviewer: frisco
Doc Reviewer: jsundman
Details:Mostly documented in the relevant bugs.
Tests:
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -5,6 +5,8 @@
* Use is subject to license terms.
* @affects animation lzanimator
* @access public
+ * @topic LFC
+ * @subtopic Controllers
*/
/**
@@ -28,8 +30,6 @@
* @lzxname animator
* @shortdesc Changes the value of another object's attribute over time.
* @see animatorgroup
- * @topic LFC
- * @subtopic Animation
*/
class LzAnimator extends LzAnimatorGroup {
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -5,7 +5,7 @@
* Use is subject to license terms.
*
* @topic LFC
- * @subtopic Layouts
+ * @subtopic Controllers
* @affects lzlayout
* @access public
*/
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -4,7 +4,7 @@
*
* @affects animation lzanimatorgroup
* @topic LFC
- * @subtopic Animation
+ * @subtopic Controllers
* @access public
*/
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataElement.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataElement.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataElement.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -2,12 +2,13 @@
* @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
+ * @access public
+ * @topic LFC
+ * @subtopic Data
*/
/**
* @access private
- * @topic LFC
- * @subtopic Data
*/
trait LzDataElementTrait {
// N.B.: LzDataElementTrait may or may not be an LzNode, so
@@ -657,8 +658,6 @@
* @shortdesc A node of hierarchical data.
* @see LzDataNode LzDataText LzDataPointer
* @access public
- * @topic LFC
- * @subtopic Data
*/
class LzDataElement extends LzMiniNode inherits LzDataElementTrait, LzDataNode {
// N.B.: LzDataElement is not an LzNode so has a different
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -94,6 +94,9 @@
*/
var p = null;
var data = null;
+
+/** The reference to a clonemanager from a clone.
+ @modifiers readonly */
var context = null;
/** @access private */
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataset.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzDataset.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -40,7 +40,7 @@
* </ul>
*
* <p>
- * If a dataset is not explictly contained within in a <xref linkend="datasource"/>, it will make an instance of datasource and be contained inside that. A dataset can be populated or re-poplulated at runtime by calling <code>doRequest</code> on the dataset. The result of the request is then returned to the application and the dataset's <xref linkend="LzDataset.prototype.ondata"/> event is run. Any <xref linkend="LzDatapointer"/> that is bound to the dataset will also run its <link linkend="LzDatapointer.prototype.ondata">ondata</link> event at this time as well.
+ * If a dataset is not explictly contained within in a <xref linkend="LzDatasource"/>, it will make an instance of datasource and be contained inside that. A dataset can be populated or re-poplulated at runtime by calling <code>doRequest</code> on the dataset. The result of the request is then returned to the application and the dataset's <xref linkend="LzDataset.prototype.ondata"/> event is run. Any <xref linkend="LzDatapointer"/> that is bound to the dataset will also run its <link linkend="LzDatapointer.prototype.ondata">ondata</link> event at this time as well.
* </p>
* <p>See the <a href="${dguide}data-structures.html">Developers's Guide</a> for more discussion of data and datasets. </p>
* <p>
@@ -457,15 +457,14 @@
/**
* Sets the querystring parameter of the dataset to the given
- * string. The dataset's querystring will be pre-pended to any request made
- * for the dataset.
+ * string. If an object is given instead of a string, the object will be
+ * automatically converted to a string and used instead. The dataset's
+ * querystring will be pre-pended to any request made for the dataset.
* @param String s: A string to be appended to any query made on behalf of
* this dataset.
*/
function setQueryString( s ) {
this.params = null;
- //@field String querystring: A string to be appended to the request that
- //the dataset makes.
if ( typeof( s ) == "object" ){
if (s instanceof LzParam){
this.querystring = s.toString();
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzParam.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzParam.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/data/LzParam.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -3,7 +3,7 @@
* @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
- * @access private
+ * @access public
* @topic LFC
* @subtopic Data
* @affects lzparam
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzCommand.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzCommand.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzCommand.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -24,7 +24,7 @@
* <li> <a href="${demos}contacts/contacts.lzx">Contacts</a></li>
*
* </ul>
- * Also, see <xref linkend="LzKeys"/>.
+ * Also, see <xref linkend="LzKeys+dhtml"/> or <xref linkend="LzKeys+swf7+swf8+swf9"/>.
*
* @devnote A command is an object that sends an event in response to keyboard input.
* @shortdesc An element that sends events in response to keyboard input.
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -4,7 +4,7 @@
* Use is subject to license terms.
*
* @affects lzselectionmanager
- * @access private
+ * @access public
* @topic LFC
* @subtopic Helpers
* @lzxname selectionmanager
@@ -133,7 +133,7 @@
/**
* Called with a new member to be selected.
- * @param o: The new element that got selected.
+ * @param LzView o: The new element that got selected.
*/
function select ( o ){
if ( this.isSelected( o ) && ( this.toggle ||
@@ -158,8 +158,8 @@
/**
* Tests for selectedness of input.
- * @param o: The object to test for selectedness.
- * @return: The selectedness of the input object.
+ * @param LzView o: The object to test for selectedness.
+ * @return Boolean: The selectedness of the input object.
*/
function isSelected ( o ) {
return this.selectedHash[ o.getUID() ];
@@ -168,7 +168,7 @@
/**
* Makes the given object selected.
* @access private
- * @param s: The object to make selected
+ * @param LzView s: The object to make selected
*/
function makeSelected ( s ) {
if ( this.selectedHash[ s.getUID() ] ) return;
@@ -182,7 +182,7 @@
/**
* Unselects the given object.
* @access protected
- * @param o: The object to make unselected
+ * @param LzView o: The object to make unselected
*/
function unselect ( o ){
for ( var i= this.selected.length-1 ; i >= 0; i-- ){
@@ -218,6 +218,8 @@
/**
* @access private
+ * @param LzDataPath s: The datapath that was at top of the selection stack
+ * @param LzView e: The newly selected view
*/
function selectRange ( s , e ){
var pview = s.immediateparent;
@@ -409,6 +411,7 @@
/**
* Tests whether the given view is selected
* @param LzView o: The view to test for selectedness
+ * @return Boolean: The selectedness of the input object.
*/
function isSelected ( o){
if ( this.manager == null ) this.manager = o.cloneManager;//try to get a cloneManager
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -26,7 +26,6 @@
* </handler>
*
* <handler name="onclick" reference="LzGlobalMouse" args="who">
- * <![CDATA[
* //need to use LzGlobalMouse, since we don't get clicks if we're
* //checked. NB that LzGlobalMouse sends its events before the view
* //receives the events, so we can just unlock it here, and the
@@ -34,7 +33,6 @@
* if (this.value && who == this){
* <em>LzModeManager.globalUnlockMouseEvents();</em>
* }
- * ]]>
* </handler>
* </checkbox>
*
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzURL.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzURL.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/services/LzURL.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -4,6 +4,8 @@
* Use is subject to license terms.
*
* @affects lzurl
+ * @topic LFC
+ * @subtopic Services
* @access public
*/
@@ -14,16 +16,15 @@
*
* http://www.ietf.org/rfc/rfc2396.txt specifies the syntax for a URI
*
- We also need to handle these cases that OpenLaszlo allows
- which aren't real URLs:
-
- http:foo.html
- http:/foo/bar.html
- http:foo.ksp?q=12
- http:/foo.ksp?q=12
- http:/foo/bar.ksp?q=12
-
-
+ * We also need to handle these cases that OpenLaszlo allows
+ * which aren't real URLs:
+ *
+ * http:foo.html
+ * http:/foo/bar.html
+ * http:foo.ksp?q=12
+ * http:/foo.ksp?q=12
+ * http:/foo/bar.ksp?q=12
+ *
*/
function LzURL( url ){
this.protocol = null;
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js 2007-07-11 20:04:01 UTC (rev 5644)
@@ -5,8 +5,8 @@
*
* @affects lzbrowser
* @access public
- * @topic Kernel
- * @subtopic DHTML
+ * @topic LFC
+ * @subtopic Services
*/
var LzBrowser = new Object;
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -32,14 +32,14 @@
*
* <p>In addition to any fields documented in the section at the end, these fields are also available:
* <ul>
- * <li><attribute>anm_multipler</attribute> A <Type>Number</Type> specifying the animation speed.</li>
+ * <li><attribute>anm_multipler</attribute> A <type>Number</type> specifying the animation speed.</li>
* <li><attribute>embedfonts</attribute> A <type>Boolean</type> true | false. Whether to embed fonts in the compiled application.</li>
* <li><attribute>lpsbuild</attribute> A <type>String</type> specifying the LPS build revision and the build directory: e.g. "4075 /Users/maxcarlson/openlaszlo/legals"</li>
- * <li><attribute>lpsbuilddate</attribute> A <Type>String</Type> specifying the date and time of the LPS build. "2007-03-05T15:33:42-0800"</li>
- * <li><attribute>lpsrelease</attribute> A <Type>String</Type> specifying the LPS release type, e.g. "Latest" </li>
- * <li><attribute>lpsversion</attribute> A <Type>String</Type> specifying the LPS version, e.g. "4.0.x"</li>
+ * <li><attribute>lpsbuilddate</attribute> A <type>String</type> specifying the date and time of the LPS build. "2007-03-05T15:33:42-0800"</li>
+ * <li><attribute>lpsrelease</attribute> A <type>String</type> specifying the LPS release type, e.g. "Latest" </li>
+ * <li><attribute>lpsversion</attribute> A <type>String</type> specifying the LPS version, e.g. "4.0.x"</li>
* <li><attribute>proxied</attribute> A <type>Boolean</type> true | false</li>
- * <li><attribute>runtime</attribute> A <Type>String</Type> describing the target runtime. "dhtml" | "swf7" | "swf8" are currently supported. Others are in development.</li>
+ * <li><attribute>runtime</attribute> A <type>String</type> describing the target runtime. "dhtml" | "swf7" | "swf8" are currently supported. Others are in development.</li>
* <li><attribute>version</attribute>A String. The same as lpsversion. </li>
* </ul></p>
* @see LzView
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloView.lzs 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LaszloView.lzs 2007-07-11 20:04:01 UTC (rev 5644)
@@ -306,7 +306,7 @@
super.__LZinstantiationDone.apply(this, arguments);
}
-/** Reference to closest masked view in the hierarchy above
+/** Reference to closest masked view in the hierarchy at or above
* this one
* @type LzView
*/
Deleted: openlaszlo/branches/legals/docs/devdocs.css
Modified: openlaszlo/branches/legals/docs/includes/docbook.css
===================================================================
--- openlaszlo/branches/legals/docs/includes/docbook.css 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/includes/docbook.css 2007-07-11 20:04:01 UTC (rev 5644)
@@ -22,6 +22,10 @@
margin-left : 10;
}
+.toc dl dd {
+ padding-left : 30px;
+}
+
h1 { margin-left : -45; }
h2 { margin-left: -30; }
h3 { margin-left : -15; }
@@ -60,6 +64,10 @@
margin-bottom: 5px;
}
+.indexdiv dl dd {
+ padding-bottom: inherit;
+}
+
/* Inline markup */
/* This substitutes for turning on shade.verbatim in parameters.xsl */
Modified: openlaszlo/branches/legals/docs/includes/lzx-pretty-print.css
===================================================================
--- openlaszlo/branches/legals/docs/includes/lzx-pretty-print.css 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/includes/lzx-pretty-print.css 2007-07-11 20:04:01 UTC (rev 5644)
@@ -4,10 +4,11 @@
* Use is subject to license terms. *
* J_LZ_COPYRIGHT_END *********************************************************/
-.starttag {color: #0000B7}
+.programlisting .code { background-color: inherit }
+.starttag, .endtag, .sgmltag-element {color: #0000B7}
.endtag {color: #0000B7}
-.attrname {color: #8B0D3A}
-.attrvalue {color: #9A3300}
+.attrname, .sgmltag-attribute {color: #8B0D3A}
+.attrvalue, sgmltag-attvalue {color: #9A3300}
.markup {color: #0000B7}
.name {color: #9A3300}
.lzxpp-co { font-weight: bold; }
Modified: openlaszlo/branches/legals/docs/includes/styles.css
===================================================================
--- openlaszlo/branches/legals/docs/includes/styles.css 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/includes/styles.css 2007-07-11 20:04:01 UTC (rev 5644)
@@ -62,7 +62,7 @@
line-height : 18px;
}
-.smaller, .copyright {
+.smaller, .copyright, .legalnotice, .pubdate {
font-size : 10px;
line-height : 16px;
}
Modified: openlaszlo/branches/legals/docs/index.html
===================================================================
--- openlaszlo/branches/legals/docs/index.html 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/index.html 2007-07-11 20:04:01 UTC (rev 5644)
@@ -12,17 +12,21 @@
<img class="logo" src="../lps/includes/logo_web_sm.gif" alt="OpenLaszlo logo" />
<h1>OpenLaszlo Documentation</h1>
-
<p>OpenLaszlo's developer documentation includes overviews, tutorials, and details on application development with Laszlo's technology. Follow the links below to find specific documentation. </p>
<ul>
<li>
+<b><a href="./userindex.html">User's Guide</a></b><br />
+Materials for adopters of the OpenLaszlo platform.
+
+<ul>
+<li>
<b><a href="./installation/index.html">Installation Instructions</a></b><br />
How to install and upgrade the OpenLaszlo Server.
</li>
<li>
-<b><a href="./guide/index.html">Software Developer's Guide</a></b><br />
+<b><a href="./developers/index.html">Software Developer's Guide</a></b><br />
In depth explanations of OpenLaszlo concepts.
</li>
<li>
@@ -32,45 +36,44 @@
<li>
<b><a href="./reference/index.html">OpenLaszlo Reference</a></b><br />
-Comprehensive listing of all LZX tag definitions and APIs -- including tag attributes and API methods and parameters.
+A complete listing of every public LZX tag and API -- including tag attributes and API methods and parameters.
</li>
<li>
-<b><a href="./indexapa.html">Master Index</a></b><br />
-A complete index covering the Developer and Adminstrator's Guides as well as the OpenLaszlo Reference
-</li>
-
-<li>
<b><a href="./release-notes.html">Release Notes</a></b><br />
What's new in the release; changes to LZX syntax.
</li>
<li>
-<b><a href="./components/components.lzx?lzt=html">Components Hierarchy</a></b><br />
-Hierarchy of components and how they're related.
-</li>
-
-<li>
<b><a href="./component-design/index.html">Component Design</a></b><br />
An Overview of the OpenLaszlo Component Set for User Interface Designers.
</li>
<li>
-<b><a href="./contributors/index.html">Contributor's Guide</a></b><br />
-A deeper look at the material in the LZX Reference, including private APIs and the runtime Kernels
+<b><a href="./indexapa.html">Master Index</a></b><br />
+A complete index covering the Developer and Adminstrator's Guides as well as the OpenLaszlo Reference.
</li>
-
</ul>
+</li>
-<p>If you cannot find answers here, please ask your question on the forums or check the index of the documentation. Also, please feel free to give us direct feedback on the documentation to <a href="mailto:docs at laszlosystems.com">docs at laszlosystems.com</a>. </p>
+<li>
+<b><a href="./contribindex.html">Contributor's Guide</a></b><br />
+Materials for contributors to the platform.
+<br />
+<ul>
+<li>
+<b><a href="./contribref/index.html">Comprehensive OpenLaszlo Reference</a></b><br />
+A comprehensive reference including public and private APIs, including kernel interfaces.
+</li>
+</ul>
+</ul>
+<p>If you cannot find answers here, please ask your question on the <a href="http://www.openlaszlo.org/community">forums</a>. Comments on the documents themselves can be posted to the forums as well, or filed in the OpenLaszlo <a href="http://www.openlaszlo.org/jira">bug database</a>. </p>
-<!-- **ENDTUTORIAL -->
-
<!-- * H_LZ_COPYRIGHT_BEGIN *********************************************** -->
<p class="copyright">Copyright © 2002-2007 <a target="_top"
href="http://www.laszlosystems.com/">Laszlo Systems, Inc.</a>
Modified: openlaszlo/branches/legals/docs/src/build.xml
===================================================================
--- openlaszlo/branches/legals/docs/src/build.xml 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/build.xml 2007-07-11 20:04:01 UTC (rev 5644)
@@ -94,16 +94,26 @@
<!-- developers guide properties -->
<property name="developers.input.dir" value="${LPS_HOME}/docs/src/developers"/>
<property name="developers.input.index" value="index.dbk"/>
- <property name="developers.output.dir" value="${docs.output.dir}/guide"/>
- <property name="developers.output.index" value="index.html"/>
+ <property name="developers.build.dir" value="${docs.build.dir}/developers"/>
+ <property name="developers.output.dir" value="${docs.output.dir}/developers"/>
+ <property name="developers.dbk.index" value="index.dbk"/>
+ <property name="developers.html.index" value="index.html"/>
<!-- deployers guide properties -->
<property name="deployers.input.dir" value="${LPS_HOME}/docs/src/deployers"/>
<property name="deployers.input.index" value="deployers-index.dbk"/>
+ <property name="deployers.build.dir" value="${docs.build.dir}/deployers"/>
<property name="deployers.output.dir" value="${docs.output.dir}/deployers"/>
- <property name="deployers.output.index" value="deployers-index.html"/>
+ <property name="deployers.dbk.index" value="index.dbk"/>
+ <property name="deployers.html.index" value="index.html"/>
- <!-- new combined developers/tutorials docbook-only build -->
+ <!-- contributors guide properties -->
+ <property name="contributors.input.dir" value="${LPS_HOME}/docs/src/contributors"/>
+ <property name="contributors.input.index" value="index.dbk"/>
+ <property name="contributors.build.dir" value="${docs.build.dir}/contributors"/>
+ <property name="contributors.output.dir" value="${docs.output.dir}/contributors"/>
+ <property name="contributors.dbk.index" value="index.dbk"/>
+ <property name="contributors.html.index" value="index.html"/>
<path id="3rd.party.classpath" >
@@ -179,6 +189,42 @@
</style>
</target>
+ <target name="dbk.examples.preprocess" depends="init,docbook.catalog.generate">
+ <!--- @param local.input.dir
+ @param local.input.index
+ @param local.output.dir
+ @param local.output.index
+ @param local.worksheet
+ -->
+
+ <!-- localdir is the output dir relative to LPS_HOME -->
+ <propertyregex property="LPS_HOME.escaped" input="${LPS_HOME}"
+ regexp="\\" replace="\\\\\\\\" global="true" defaultvalue="${LPS_HOME}" />
+ <propertyregex property="localdir"
+ input="${local.output.dir}"
+ regexp="${LPS_HOME.escaped}/(.*)"
+ select="\1/"/>
+
+ <java classname="com.icl.saxon.StyleSheet"
+ fork="yes"
+ failonerror="yes"
+ maxmemory="512m">
+ <classpath refid="saxon.processor.classpath"/>
+ <jvmarg value="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
+ <jvmarg value="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
+ <jvmarg value="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/>
+
+ <arg line="-x org.apache.xml.resolver.tools.ResolvingXMLReader"/>
+ <arg line="-y org.apache.xml.resolver.tools.ResolvingXMLReader"/>
+ <arg line="-r org.apache.xml.resolver.tools.CatalogResolver"/>
+ <arg line="-o ${local.output.dir}/${local.output.index}"/>
+ <arg line="${local.input.dir}/${local.input.index}"/>
+ <arg line="${local.worksheet}"/>
+ <arg line="base.dir=${local.input.dir}/"/>
+ </java>
+
+ </target>
+
<target name="book.html.generate" depends="init,docbook.catalog.generate">
<!--- @param local.input.dir
@param local.input.index
@@ -208,7 +254,7 @@
<java classname="com.icl.saxon.StyleSheet"
fork="yes"
- failonerror="${build.docs.error.fail}"
+ failonerror="yes"
maxmemory="512m">
<classpath refid="saxon.processor.classpath"/>
<jvmarg value="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
@@ -608,11 +654,11 @@
</style>
</target>
- <target name="reference.dbk.generate" depends="init,reference.dbk.build"
+ <target name="reference.preprocess" depends="init,reference.dbk.build"
unless="reference.skip">
<copy todir="${reference.build.dir}">
- <fileset dir="${reference.src.dir}"/>
+ <fileset dir="${reference.src.dir}" includes="*.dbk"/>
</copy>
<copy todir="${reference.build.dir}/programs">
@@ -623,6 +669,13 @@
<mapper type="glob" from="*.in" to="*"/>
</copy>
+ <antcall target="dbk.examples.preprocess" inheritAll="true">
+ <param name="local.input.dir" value="${docs.build.dir}"/>
+ <param name="local.input.index" value="reference/index.dbk"/>
+ <param name="local.output.dir" value="${reference.output.dir}"/>
+ <param name="local.output.index" value="reference.dbk"/>
+ <param name="local.worksheet" value="xsl/dbkpreprocessexamples.xsl"/>
+ </antcall>
</target>
<target name="reference.html.dep" depends="init">
@@ -630,7 +683,7 @@
<or>
<isset property="reference.skip"/>
<uptodate>
- <srcfiles dir="${reference.build.dir}" includes="*.dbk"/>
+ <srcfiles dir="${reference.output.dir}" includes="reference.dbk"/>
<srcfiles dir="xsl" includes="refguide-html.xsl"/>
<mergemapper to="${reference.output.dir}/index.html"/>
</uptodate>
@@ -640,14 +693,14 @@
</target>
- <target name="reference.html.generate" depends="init,reference.dbk.generate,reference.html.dep"
+ <target name="reference.html.generate" depends="init,reference.preprocess,reference.html.dep"
unless="reference.html.uptodate">
<antcall target="book.html.generate" inheritAll="true">
- <param name="local.input.dir" value="${reference.build.dir}"/>
- <param name="local.input.index" value="index.dbk"/>
+ <param name="local.input.dir" value="${reference.output.dir}"/>
+ <param name="local.input.index" value="reference.dbk"/>
<param name="local.output.dir" value="${docs.output.dir}"/>
- <param name="local.output.index" value="refguide.dbk"/>
+ <param name="local.output.index" value="reference/index.html"/>
<param name="local.output.depends.dir" value="${docs.output.dir}/reference"/>
<param name="local.output.depends.set" value="*"/>
<param name="local.worksheet" value="xsl/refguide-html.xsl"/>
@@ -656,7 +709,7 @@
</target>
- <target name="reference.resources" depends="init,reference.dbk.generate,components.resources.generate"
+ <target name="reference.resources" depends="init,reference.preprocess,components.resources.generate"
unless="reference.skip">
<mkdir dir="${contribref.build.dir}"/>
@@ -742,6 +795,42 @@
<antcall target="dbk.topic.generate" inheritAll="true">
<param name="local.input.file" value="${contribref.file.in}"/>
+ <param name="local.output.file" value="${contribref.build.dir}/compref.dbk"/>
+ <param name="filter.topic" value="Components"/>
+ <param name="visibility.filter" value="${contribref.visibility.filter}"/>
+ <param name="dbk.show.comments" value="${contribref.show.comments}"/>
+ <param name="dbk.show.fixmes" value="${contribref.show.fixmes}"/>
+ </antcall>
+
+ <antcall target="dbk.topic.generate" inheritAll="true">
+ <param name="local.input.file" value="${contribref.file.in}"/>
+ <param name="local.output.file" value="${contribref.build.dir}/chartref.dbk"/>
+ <param name="filter.topic" value="Charting And Graphing"/>
+ <param name="visibility.filter" value="${contribref.visibility.filter}"/>
+ <param name="dbk.show.comments" value="${contribref.show.comments}"/>
+ <param name="dbk.show.fixmes" value="${contribref.show.fixmes}"/>
+ </antcall>
+
+ <antcall target="dbk.topic.generate" inheritAll="true">
+ <param name="local.input.file" value="${contribref.file.in}"/>
+ <param name="local.output.file" value="${contribref.build.dir}/extref.dbk"/>
+ <param name="filter.topic" value="Extensions"/>
+ <param name="visibility.filter" value="${contribref.visibility.filter}"/>
+ <param name="dbk.show.comments" value="${contribref.show.comments}"/>
+ <param name="dbk.show.fixmes" value="${contribref.show.fixmes}"/>
+ </antcall>
+
+ <antcall target="dbk.topic.generate" inheritAll="true">
+ <param name="local.input.file" value="${contribref.file.in}"/>
+ <param name="local.output.file" value="${contribref.build.dir}/incref.dbk"/>
+ <param name="filter.topic" value="Incubator"/>
+ <param name="visibility.filter" value="${contribref.visibility.filter}"/>
+ <param name="dbk.show.comments" value="${contribref.show.comments}"/>
+ <param name="dbk.show.fixmes" value="${contribref.show.fixmes}"/>
+ </antcall>
+
+ <antcall target="dbk.topic.generate" inheritAll="true">
+ <param name="local.input.file" value="${contribref.file.in}"/>
<param name="local.output.file" value="${contribref.build.dir}/extras.dbk"/>
<param name="filter.topic" value="none"/>
<param name="visibility.filter" value="${contribref.visibility.filter}"/>
@@ -760,11 +849,11 @@
</style>
</target>
- <target name="contribref.dbk.generate" depends="init,contribref.dbk.build,js2doc.rng"
+ <target name="contribref.preprocess" depends="init,contribref.dbk.build,js2doc.rng"
unless="reference.skip">
<copy todir="${contribref.build.dir}">
- <fileset dir="${contribref.src.dir}"/>
+ <fileset dir="${contribref.src.dir}" includes="*.dbk"/>
</copy>
<copy todir="${contribref.build.dir}/programs">
@@ -776,10 +865,18 @@
</copy>
<copy todir="${contribref.build.dir}" file="${lps.server.dir}/lib/js2doc.rnc"/>
+
+ <antcall target="dbk.examples.preprocess" inheritAll="true">
+ <param name="local.input.dir" value="${docs.build.dir}"/>
+ <param name="local.input.index" value="contribref/index.dbk"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="contribref/contribref.dbk"/>
+ <param name="local.worksheet" value="xsl/dbkpreprocessexamples.xsl"/>
+ </antcall>
</target>
<!-- wont read dtd - need to debug
- <target name="contribref.dbk.validate" depends="init,contribref.dbk.generate">
+ <target name="contribref.dbk.validate" depends="init,contribref.preprocess">
<jing schemaFile="${docbook-xml}/docbookx.dtd">
<fileset dir="${contribref.build.dir}" includes="*.dbk"/>
</jing>
@@ -791,7 +888,7 @@
<or>
<isset property="reference.skip"/>
<uptodate>
- <srcfiles dir="${contribref.build.dir}" includes="*.dbk"/>
+ <srcfiles dir="${contribref.output.dir}" includes="contribref.dbk"/>
<srcfiles dir="xsl" includes="refguide-html.xsl"/>
<mergemapper to="${contribref.output.dir}/index.html"/>
</uptodate>
@@ -799,14 +896,14 @@
</condition>
</target>
- <target name="contribref.html.generate" depends="init,contribref.dbk.generate,contribref.html.dep"
+ <target name="contribref.html.generate" depends="init,contribref.preprocess,contribref.html.dep"
unless="contribref.html.uptodate">
<antcall target="book.html.generate" inheritAll="true">
- <param name="local.input.dir" value="${contribref.build.dir}"/>
- <param name="local.input.index" value="index.dbk"/>
- <param name="local.output.dir" value="${contribref.output.dir}"/>
- <param name="local.output.index" value="refguide.dbk"/>
+ <param name="local.input.dir" value="${docs.output.dir}"/>
+ <param name="local.input.index" value="contribref/contribref.dbk"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="contribref/index.dbk"/>
<param name="local.output.depends.dir" value="${contribref.output.dir}"/>
<param name="local.output.depends.set" value="*"/>
<param name="local.worksheet" value="xsl/refguide-html.xsl"/>
@@ -920,73 +1017,52 @@
<target name="reference.compiler.build" depends="reference.compiler.html.generate,reference.compiler.resources.generate"/>
- <!-- dguide targets -->
-
- <!-- A parameterized target called by *.preprocess. Inputs are
- local.input.dir, local.input.index, and local.build.dir -->
- <target name="book.preprocess" depends="init,docbook.catalog.generate">
- <mkdir dir="${local.build.dir}"/>
- <outofdate>
- <sourcefiles>
- <fileset dir="xsl" includes="html2dbk.xsl,xref.xsl"/>
- </sourcefiles>
- <targetfiles>
- <fileset dir="${local.build.dir}" includes="*.dbk" excludes="${local.input.index}"/>
- </targetfiles>
- <sequential>
- <delete>
- <fileset dir="${local.build.dir}" includes="*.dbk" excludes="${local.input.index}"/>
- </delete>
- </sequential>
- </outofdate>
- <style style="xsl/collect-includes.xsl"
- in="${local.input.dir}/${local.input.index}"
- out="${local.build.dir}/includes.txt"/>
- <style style="xsl/doc2dbk.xsl"
- basedir="${local.input.dir}"
- includesfile="${local.build.dir}/includes.txt"
- destdir="${local.build.dir}"
- extension=".dbk"
- excludes="${local.output.index}">
- <xmlcatalog refid="commonDTDs"/>
- <xmlcatalog refid="docbook.local.xsl"/>
- <param name="show.fixmes" expression="${show.fixmes}"/>
- </style>
- <copy todir="${local.build.dir}">
- <fileset dir="${local.input.dir}" includes="*.dbk" excludes="${local.input.index}"/>
- </copy>
- </target>
-
<!-- developer's guide -->
- <target name="developers.docbook" depends="init">
- <antcall target="book.html.generate" inheritAll="true">
- <param name="local.input.dir" value="${developers.input.dir}"/>
- <param name="local.input.index" value="${developers.input.index}"/>
- <param name="local.output.dir" value="${docs.output.dir}"/>
- <param name="local.output.index" value="${developers.output.index}"/>
- <param name="local.output.depends.dir" value="${docs.output.dir}/guide"/>
- <param name="local.output.depends.set" value="*"/>
- <param name="local.worksheet" value="xsl/dguide.xsl"/>
- </antcall>
+ <target name="developers.preprocess" depends="init">
+ <copy todir="${developers.build.dir}">
+ <fileset dir="${developers.input.dir}"/>
+ </copy>
</target>
- <target name="developers.resources" depends="init">
- <foreach target="book.resources.generate" list="dguide" param="dir"
+ <target name="developers.resources" depends="developers.preprocess">
+ <foreach target="book.resources.generate" list="developers" param="dir"
inheritall="true">
- <param name="local.input.dir" value="${developers.input.dir}"/>
+ <param name="local.input.dir" value="${developers.build.dir}"/>
<param name="local.output.dir" value="${developers.output.dir}"/>
- <param name="local.build.dir" value="${developers.input.dir}"/>
+ <param name="local.build.dir" value="${developers.build.dir}"/>
</foreach>
<foreach target="book.resources.generate" list="tutorials" param="dir"
inheritall="true">
- <param name="local.input.dir" value="${developers.input.dir}"/>
- <param name="local.output.dir" value="${developers.output.dir}"/>
- <param name="local.build.dir" value="${developers.input.dir}"/>
+ <param name="local.input.dir" value="${developers.build.dir}/tutorials"/>
+ <param name="local.output.dir" value="${developers.output.dir}/tutorials "/>
+ <param name="local.build.dir" value="${developers.build.dir}/tutorials"/>
</foreach>
</target>
- <target name="developers" depends="developers.resources,developers.docbook"
+ <target name="developers.examples.preprocess" depends="developers.preprocess">
+ <antcall target="dbk.examples.preprocess" inheritAll="true">
+ <param name="local.input.dir" value="${docs.build.dir}"/>
+ <param name="local.input.index" value="developers/${developers.input.index}"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="developers/${developers.dbk.index}"/>
+ <param name="local.worksheet" value="xsl/dbkpreprocessexamples.xsl"/>
+ </antcall>
+ </target>
+
+ <target name="developers.html.generate" depends="developers.examples.preprocess">
+ <antcall target="book.html.generate" inheritAll="true">
+ <param name="local.input.dir" value="${docs.output.dir}"/>
+ <param name="local.input.index" value="developers/${developers.dbk.index}"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="developers/${developers.html.index}"/>
+ <param name="local.output.depends.dir" value="${developers.output.dir}"/>
+ <param name="local.output.depends.set" value="*"/>
+ <param name="local.worksheet" value="xsl/dguide.xsl"/>
+ </antcall>
+ </target>
+
+ <target name="developers" depends="developers.resources,developers.html.generate"
unless="skip.doc">
</target>
@@ -1013,25 +1089,20 @@
<fileset dir="${developers.output.dir}/tutorials/programs" includes="*-*.lzx"/>
</apply>
</target>
-
+
+ <!-- wont read dtd - need to debug -->
<target name="developers.validate" depends="init">
- <jing rngfile="schemas/docs.rnc" compactsyntax="true" checkid="true">
- <fileset dir="developers" includes="*.html"/>
+ <jing schemaFile="${docbook-xml}/docbookx.dtd">
+ <fileset dir="${developers.input.dir}" includes="*.dbk"/>
</jing>
</target>
<!-- deployer's guide -->
- <target name="deployers.docbook" depends="init">
- <antcall target="book.html.generate" inheritAll="true">
- <param name="local.input.dir" value="${deployers.input.dir}"/>
- <param name="local.input.index" value="${deployers.input.index}"/>
- <param name="local.output.dir" value="${docs.output.dir}"/>
- <param name="local.output.index" value="${deployers.output.index}"/>
- <param name="local.output.depends.dir" value="${docs.output.dir}/deployers"/>
- <param name="local.output.depends.set" value="*"/>
- <param name="local.worksheet" value="xsl/dguide.xsl"/>
- </antcall>
+ <target name="deployers.preprocess" depends="init">
+ <copy todir="${deployers.build.dir}">
+ <fileset dir="${deployers.input.dir}"/>
+ </copy>
</target>
<target name="deployers.resources" depends="init">
@@ -1043,7 +1114,29 @@
</foreach>
</target>
- <target name="deployers" depends="deployers.resources,deployers.docbook"
+ <target name="deployers.examples.preprocess" depends="deployers.preprocess">
+ <antcall target="dbk.examples.preprocess" inheritAll="true">
+ <param name="local.input.dir" value="${docs.build.dir}"/>
+ <param name="local.input.index" value="deployers/${deployers.input.index}"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="deployers/${deployers.dbk.index}"/>
+ <param name="local.worksheet" value="xsl/dbkpreprocessexamples.xsl"/>
+ </antcall>
+ </target>
+
+ <target name="deployers.html.generate" depends="deployers.examples.preprocess">
+ <antcall target="book.html.generate" inheritAll="true">
+ <param name="local.input.dir" value="${docs.output.dir}"/>
+ <param name="local.input.index" value="deployers/${deployers.dbk.index}"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="deployers/${deployers.html.index}"/>
+ <param name="local.output.depends.dir" value="${deployers.output.dir}"/>
+ <param name="local.output.depends.set" value="*"/>
+ <param name="local.worksheet" value="xsl/dguide.xsl"/>
+ </antcall>
+ </target>
+
+ <target name="deployers" depends="deployers.resources,deployers.html.generate"
unless="skip.doc">
</target>
@@ -1054,39 +1147,108 @@
</delete>
</target>
+ <!-- wont read dtd - need to debug -->
<target name="deployers.validate" depends="init">
- <jing rngfile="schemas/docs.rnc" compactsyntax="true" checkid="true">
- <fileset dir="deployers" includes="*.html"/>
+ <jing schemaFile="${docbook-xml}/docbookx.dtd">
+ <fileset dir="${deployers.input.dir}" includes="*.dbk"/>
</jing>
</target>
<!-- user set -->
- <target name="users" depends="developers.resources,deployers.resources,reference.dbk.generate,reference.resources">
- <antcall target="book.html.generate" inheritAll="true">
- <param name="local.input.dir" value="${docs.src.dir}"/>
+ <target name="users.preprocess" depends="reference.preprocess,developers.preprocess,deployers.preprocess">
+
+ <copy todir="${docs.build.dir}">
+ <fileset dir="${docs.src.dir}" includes="userset.dbk"/>
+ </copy>
+
+ <antcall target="dbk.examples.preprocess" inheritAll="true">
+ <param name="local.input.dir" value="${docs.build.dir}"/>
<param name="local.input.index" value="userset.dbk"/>
<param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="userindex.dbk"/>
+ <param name="local.worksheet" value="xsl/dbkpreprocessexamples.xsl"/>
+ </antcall>
+ </target>
+
+ <target name="users" depends="developers.resources,deployers.resources,users.preprocess,reference.resources">
+ <antcall target="book.html.generate" inheritAll="true">
+ <param name="local.input.dir" value="${docs.output.dir}"/>
+ <param name="local.input.index" value="userindex.dbk"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
<param name="local.output.index" value="userindex.html"/>
<param name="local.output.depends.dir" value="${docs.output.dir}"/>
- <param name="local.output.depends.set" value="userindex.html indexapa.html guide/*.html deployers/*.html reference/*.html"/>
+ <param name="local.output.depends.set" value="userindex.html indexapa.html developers/*.html deployers/*.html reference/*.html"/>
<param name="local.worksheet" value="xsl/refguide-html.xsl"/>
</antcall>
</target>
<target name="users.clean" depends="reference.clean,developers.clean,deployers.clean">
<delete failonerror="false">
+ <fileset dir="${docs.output.dir}" includes="userindex.dbk"/>
<fileset dir="${docs.output.dir}" includes="userindex.html"/>
<fileset dir="${docs.output.dir}" includes="indexapa.html"/>
</delete>
</target>
+ <!-- contributors set -->
+
+ <target name="contributors.preprocess" depends="contribref.preprocess">
+
+ <copy todir="${contributors.build.dir}">
+ <fileset dir="${contributors.input.dir}"/>
+ </copy>
+
+ <copy todir="${docs.build.dir}">
+ <fileset dir="${docs.src.dir}" includes="contribset.dbk"/>
+ </copy>
+
+ <antcall target="dbk.examples.preprocess" inheritAll="true">
+ <param name="local.input.dir" value="${docs.build.dir}"/>
+ <param name="local.input.index" value="contribset.dbk"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="contribindex.dbk"/>
+ <param name="local.worksheet" value="xsl/dbkpreprocessexamples.xsl"/>
+ </antcall>
+ </target>
+
+ <target name="contributors.resources" depends="init">
+ <foreach target="book.resources.generate" list="contributors" param="dir"
+ inheritall="true">
+ <param name="local.input.dir" value="${contributors.build.dir}"/>
+ <param name="local.output.dir" value="${contributors.output.dir}"/>
+ <param name="local.build.dir" value="${contributors.build.dir}"/>
+ </foreach>
+ </target>
+
+ <target name="contributors" depends="contributors.preprocess,contribref.resources,contributors.resources">
+ <antcall target="book.html.generate" inheritAll="true">
+ <param name="local.input.dir" value="${docs.output.dir}"/>
+ <param name="local.input.index" value="contribindex.dbk"/>
+ <param name="local.output.dir" value="${docs.output.dir}"/>
+ <param name="local.output.index" value="contribindex.html"/>
+ <param name="local.output.depends.dir" value="${docs.output.dir}"/>
+ <param name="local.output.depends.set" value="contribindex.html contributors/*.html contribref/*.html"/>
+ <param name="local.worksheet" value="xsl/refguide-html.xsl"/>
+ </antcall>
+ </target>
+
+ <target name="contributors.clean" depends="contribref.clean">
+ <delete failonerror="false" includeEmptyDirs="true">
+ <fileset dir="${contributors.output.dir}"/>
+ </delete>
+ <delete failonerror="false">
+ <fileset dir="${docs.output.dir}" includes="contribindex.dbk"/>
+ <fileset dir="${docs.output.dir}" includes="contribindex.html"/>
+ </delete>
+ </target>
+
<!--
targets relating to both ref and tutorial docs:
-->
<target name="build" description="Make the documentation"
- depends="users,contribref"
+ depends="users,contributors"
unless="skip.doc"/>
<target name="clean" description="clean up generated files"
Deleted: openlaszlo/branches/legals/docs/src/contribref/doctools-ref.dbk
Modified: openlaszlo/branches/legals/docs/src/contribref/index.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/contribref/index.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/contribref/index.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -7,8 +7,9 @@
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book language="en" xmlns:xi="http://www.w3.org/2003/XInclude">
<?dbhtml dir="contribref" ?>
- <title>OpenLaszlo 4.0 Contributor's Guide (beta)</title>
- <titleabbrev>OL4 Contributor's Guide</titleabbrev>
+ <?dbhtml filename="index.html" ?>
+ <title>OpenLaszlo 4.0 Comprehensive Reference</title>
+ <titleabbrev>OL4 Comprehensive Reference</titleabbrev>
<xi:include href="book-info.dbk"></xi:include>
@@ -32,26 +33,28 @@
<xi:fallback><para>Missing: LFC Reference</para></xi:fallback>
</xi:include>
-<!--
- <xi:include href="extras.dbk">
- <xi:fallback><para>Missing: Extras Reference</para></xi:fallback>
+ <xi:include href="compref.dbk">
+ <xi:fallback><para>Missing: Components Reference</para></xi:fallback>
</xi:include>
--->
- <xi:include href="licenses.dbk">
- <xi:fallback><para>Missing: Licenses Reference</para></xi:fallback>
+ <xi:include href="extref.dbk">
+ <xi:fallback><para>Missing: Extensions Reference</para></xi:fallback>
</xi:include>
- <xi:include href="doctools-ref.dbk">
- <xi:fallback><para>Missing: Doc Tools Reference</para></xi:fallback>
+ <xi:include href="chartref.dbk">
+ <xi:fallback><para>Missing: Charting Reference</para></xi:fallback>
</xi:include>
-
- <xi:include href="js2doc-ref.dbk">
- <xi:fallback><para>Missing: JS2Doc Reference</para></xi:fallback>
+
+ <xi:include href="incref.dbk">
+ <xi:fallback><para>Missing: Incubator Reference</para></xi:fallback>
</xi:include>
-
+
<xi:include href="xref.dbk">
<xi:fallback><para>Missing: Cross-Reference</para></xi:fallback>
</xi:include>
+ <?appendix id="schema"><title>Schema</title></appendix ?>
+ <?appendix id="reserved-words"><title>Reserved words</title></appendix ?>
+
+
</book>
Deleted: openlaszlo/branches/legals/docs/src/contribref/js2doc-ref.dbk
Deleted: openlaszlo/branches/legals/docs/src/contribref/licenses.dbk
Copied: openlaszlo/branches/legals/docs/src/contribset.dbk (from rev 5631, openlaszlo/branches/doctools/docs/src/contribset.dbk)
Copied: openlaszlo/branches/legals/docs/src/contributors (from rev 5631, openlaszlo/branches/doctools/docs/src/contributors)
Copied: openlaszlo/branches/legals/docs/src/contributors/programs (from rev 5631, openlaszlo/branches/doctools/docs/src/contributors/programs)
Modified: openlaszlo/branches/legals/docs/src/deployers/architecture.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/deployers/architecture.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/deployers/architecture.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,4 @@
-<chapter id="architecture">
+<chapter id="deployers.architecture">
<title>OpenLaszlo Architecture</title>
Modified: openlaszlo/branches/legals/docs/src/deployers/deploy-preface.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/deployers/deploy-preface.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/deployers/deploy-preface.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,7 +1,5 @@
-<preface id="deploy-preface">
-<?html2db class="preface"?>
+<section>
-<title>Preface</title>
<para>OpenLaszlo applications are written in the LZX language and compiled to .swf files that execute in the Flash Player. This
Guide explains how to make those applications available to users on the Web. The <ulink url="../guide">Software Developer's
Guide to Laszlo Applications</ulink> explains how to construct and test applications before you deploy them for general use.</para>
@@ -74,4 +72,4 @@
you will find an active discussion of all aspects of the language, and
a place to ask questions of your own.</para>
-<para/></section></section></preface>
\ No newline at end of file
+<para/></section></section></section>
\ No newline at end of file
Modified: openlaszlo/branches/legals/docs/src/deployers/deployers-index.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/deployers/deployers-index.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/deployers/deployers-index.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -10,32 +10,27 @@
<?dbhtml filename="index.html" ?>
<title>System Administrator's Guide to Deploying OpenLaszlo Applications</title>
<titleabbrev>Deployer Guide</titleabbrev>
- <part id="preface">
- <xi:include href="deploy-preface.dbk"/>
- </part>
-
-
- <part id="overview">
+ <preface id="deployers.preface">
+ <title>Preface</title>
+ <xi:include href="deploy-preface.dbk"/>
+ </preface>
+
+ <part id="deployers.overview">
<title>Overview</title>
<xi:include href="architecture.dbk"/>
<!--xi:include href="program-development.dbk"/-->
</part>
-
-
-
- <part id="server-integration">
+ <part id="deployers.server-integration">
<title>Managing OpenLaszlo Server Deployments</title>
- <!--xi:include href="integrating-existing.dbk"/-->
+ <!--xi:include href="integrating-existing.dbk"/-->
<xi:include href="logging.dbk"/>
<xi:include href="lps-request-types.dbk"/>
- <xi:include href="deployers-guide.dbk"/>
- <!--xi:include href="caching.dbk"/-->
-
-
+ <xi:include href="deployers-guide.dbk"/>
+ <!--xi:include href="caching.dbk"/-->
</part>
<xi:include href="book-info.dbk"/>
Modified: openlaszlo/branches/legals/docs/src/deployers/logging.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/deployers/logging.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/deployers/logging.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -23,7 +23,7 @@
this chapter touches on only a handful of the Log4j details you may need or want to know.
Before we go on to discuss the LPS log in some detail, we will first briefly
go over the logging details provided by the servlet container.
-<xref linkend="architecture"/> explains what a container is and how LPS fits
+<xref linkend="deployers.architecture"/> explains what a container is and how LPS fits
inside it.
</para>
Modified: openlaszlo/branches/legals/docs/src/deployers/lps-request-types.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/deployers/lps-request-types.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/deployers/lps-request-types.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -3,7 +3,7 @@
<para>
This document briefly describes OpenLaszlo request types. It assumes
that you are generally familiar with <ulink url="http://www.w3.org/Protocols/rfc2068/rfc2068">HTTP</ulink>, <ulink url="http://www.w3.org/Addressing/">URLs</ulink>,
- and the OpenLaszlo architecture described in <xref linkend="architecture"/>.
+ and the OpenLaszlo architecture described in <xref linkend="deployers.architecture"/>.
</para>
<para/><section id="request-types.request-types"><title>What are OpenLaszlo Request Types?</title>
Modified: openlaszlo/branches/legals/docs/src/developers/book-info.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/book-info.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/book-info.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,7 +1,7 @@
<bookinfo>
<corpauthor>Laszlo Systems, Inc.</corpauthor>
<productname>OpenLaszlo</productname>
- <mediaobject><imageobject><imagedata fileref="logo.png"/>
+ <mediaobject><imageobject><imagedata fileref="images/logo.png"/>
</imageobject></mediaobject>
<copyright>
<year>2001</year>
@@ -13,16 +13,10 @@
<year>2007</year>
<holder>Laszlo Systems, Inc.</holder>
</copyright>
- <pubdate>March, 2007</pubdate>
- <legalnotice>
- <para>
- All Rights Reserved. Use is subject to license terms.</para>
-<para>Flash™ and Macromedia Flash™ are trademarks of Adobe Systems, Inc.</para>
-<para>Laszlo® is a registered trademark, and OpenLaszlo™, LZX™ and OpenLaszlo Explorer™ are
- trademarks of Laszlo Systems, Inc.
-</para>
-
+ <legalnotice>
+ <para>Laszlo® is a registered trademark, and OpenLaszlo™, LZX™ and OpenLaszlo Explorer™ are trademarks of Laszlo Systems, Inc.</para>
</legalnotice>
+ <pubdate>March, 2007</pubdate>
</bookinfo>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/branches/legals/docs/src/developers/browser-integration.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/browser-integration.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/browser-integration.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -581,7 +581,7 @@
<title>Example: building a URL</title>
<para>
-The <indexterm><primary><literal>LzBrowser.loadURL()()</literal></primary></indexterm><methodname>LzBrowser.loadURL()()</methodname> method is used
+The <methodname role="LzBrowser.prototype.loadURL">loadURL()</methodname> method is used
to create a URL based on user input. This URL is then communicated to browser, where a JavaScript function is
used to unpack it and fill in a form. The wrapper page is shown immediately below.
</para>
Modified: openlaszlo/branches/legals/docs/src/developers/debugging.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/debugging.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/debugging.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -405,7 +405,7 @@
<para>The debugger provides methods that allow you to see interactions between parts of your application.</para>
<para/><section><title>Tracing</title>
<para>
-When you invoke the <indexterm><primary><literal>debug.trace()()</literal></primary></indexterm><methodname>debug.trace()()</methodname>, the debugger traces the named method of the object and prints a message to the Debug console each time it is called or returned from. When called, the message includes a timestamp, the name of the function and the arguments it was called with. When returned from, the message gives the name of the function and the value it returned (if any). If backtraces are enabled, inspecting the message will reveal the call chain that caused the modification.
+When you invoke the <methodname role="LzDebug.prototype.trace">trace()</methodname>, the debugger traces the named method of the object and prints a message to the Debug console each time it is called or returned from. When called, the message includes a timestamp, the name of the function and the arguments it was called with. When returned from, the message gives the name of the function and the value it returned (if any). If backtraces are enabled, inspecting the message will reveal the call chain that caused the modification.
</para>
<para/></section><section><title>Backtracing</title>
<para>
@@ -440,9 +440,9 @@
<para>
A running OpenLaszlo application allocates parts of available virtual memory to store objects. When these objects are no longer needed the memory should be released by the application in order to become once again available for other use. Sometimes unneeded memory is not properly released, in which case the application tends to slow down over time as less and less memory becomes available. This is "leaking memory." The OpenLaszlo debugger can help you find memory leaks.
</para><para>
-Three methods on <literal>__LzDebug</literal> are used to find leaks:</para>
+Three methods on <classname>__LzDebug</classname> are used to find leaks:</para>
-<orderedlist spacing="compact"><listitem><para><indexterm><primary><literal>markObjects()()</literal></primary></indexterm><methodname>markObjects()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>findNewObjects()()</literal></primary></indexterm><methodname>findNewObjects()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>whyAlive()()</literal></primary></indexterm><methodname>whyAlive()()</methodname></para></listitem></orderedlist>
+<orderedlist spacing="compact"><listitem><para><methodname role="LzDebug.prototype.markObjects">markObjects()</methodname></para></listitem><listitem><para><methodname role="LzDebug.prototype.findNewObjects">findNewObjects()</methodname></para></listitem><listitem><para><methodname role="LzDebug.prototype.whyAlive">whyAlive()</methodname></para></listitem></orderedlist>
<para>
You use them in that order. Typically, you will start up your program, run it for a bit until you think it has reached a steady state. Then invoke <literal>__LzDebug.markObjects()</literal>. This runs in the background and will mark all the objects that are currently in use. When you see the output '''Trace Done''' you can move on to the next step.
Modified: openlaszlo/branches/legals/docs/src/developers/developers_guide_preface.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/developers_guide_preface.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/developers_guide_preface.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,8 +1,5 @@
-<preface id="developers_guide_preface">
-<?html2db class="preface"?>
+<section>
-<title>Preface</title>
-
<para>We invented this technology to make it possible to create web
applications that are delightful to use.</para>
@@ -213,4 +210,4 @@
you will find an active discussion of all aspects of the language, and
a place to ask questions of your own.</para>
-<para/></section></section></preface>
\ No newline at end of file
+<para/></section></section></section>
\ No newline at end of file
Modified: openlaszlo/branches/legals/docs/src/developers/index.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/index.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/index.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -6,16 +6,17 @@
<!--DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"-->
<book xmlns:xi="http://www.w3.org/2003/XInclude">
- <?dbhtml dir="guide" ?>
+ <?dbhtml dir="developers" ?>
<?dbhtml filename="index.html" ?>
<title>Software Engineer's Guide to Developing OpenLaszlo Applications</title>
<titleabbrev>Developer Guide</titleabbrev>
-<part id="Preface">
- <title>Preface</title>
-
- <xi:include href="developers_guide_preface.dbk"/>
-</part>
- <part id="overview">
+
+ <preface id="developers.preface">
+ <title>Preface</title>
+ <xi:include href="developers_guide_preface.dbk"/>
+ </preface>
+
+ <part id="developers.overview">
<title>Overview</title>
<xi:include href="architecture.dbk"/>
@@ -24,7 +25,7 @@
<xi:include href="program-development.dbk"/>
</part>
- <part id="tutorials">
+ <part id="developers.tutorials">
<title>Tutorial Introduction</title>
<xi:include href="tutorials/laszlo_basics.dbk"/>
<xi:include href="comp-intro.dbk"/>
@@ -39,7 +40,7 @@
<!--xi:include href="tutorials/solo-intro.dbk"-->
</part>
- <part id="building-apps">
+ <part id="developers.building-apps">
<title>Fundamental Concepts</title>
<xi:include href="structure.dbk"/>
<xi:include href="comp-overview.dbk"/>
@@ -54,7 +55,7 @@
<xi:include href="animation.dbk"/>
</part>
- <part id="power">
+ <part id="developers.power">
<title>In Depth</title>
<xi:include href="proxied.dbk"/>
<xi:include href="views.dbk"/>
@@ -68,28 +69,32 @@
<xi:include href="components-design.dbk"/>
<xi:include href="browser-integration.dbk"/>
</part>
- <part id="data">
+
+ <part id="developers.data">
<title>Data and Databinding</title>
- <xi:include href="data-structures.dbk"/>
- <xi:include href="databinding.dbk"/>
- <xi:include href="tutorials/data_app.dbk"/>
- </part>
- <part id="media">
- <title>Media</title>
- <xi:include href="video.dbk"/>
- </part>
- <part id="application">
- <title>Examining Applications</title>
- <xi:include href="survey-chapter.dbk"/>
- </part>
- <part id="performance">
+ <xi:include href="data-structures.dbk"/>
+ <xi:include href="databinding.dbk"/>
+ <xi:include href="tutorials/data_app.dbk"/>
+ </part>
+
+ <part id="developers.media">
+ <title>Media</title>
+ <xi:include href="video.dbk"/>
+ </part>
+
+ <part id="developers.application">
+ <title>Examining Applications</title>
+ <xi:include href="survey-chapter.dbk"/>
+ </part>
+
+ <part id="developers.performance">
<title>Performance Monitoring and Tuning</title>
<!--xi:include href="data-pooling.dbk"/-->
<xi:include href="performance.dbk"/>
<?ignore <chapter id="colors"><title>Color in Laszlo Applications</title></chapter>?>
</part>
- <part id="server-integration">
+ <part id="developers.server-integration">
<title>Server Integration</title>
<!--xi:include href="integrating-existing.dbk"/-->
<xi:include href="cookies.dbk"/>
@@ -98,21 +103,20 @@
<!--xi:include href="lps-request-types.dbk"/-->
<!--xi:include href="soap-xmlrpc.dbk"/-->
<!--xi:include href="deployers-guide.dbk"/-->
- <!--xi:include href="caching.dbk"/-->
-
+ <!--xi:include href="caching.dbk"/-->
</part>
- <?ignore <part id="advanced">
+ <?part id="developers.advanced">
<title>Power Programming in LZX</title>
<!--Procedural Programming using Script-->
-?>
+ </part ?>
-<?ignore <!--xi:include href="focus-modality.dbk"/-->
- <!--xi:include href="best-practices.dbk"/-->
- </part>
- ?>
+ <?part id="developers.best-practices>
+ <!--xi:include href="focus-modality.dbk"/-->
+ <!--xi:include href="best-practices.dbk"/-->
+ </part ?>
- <part id="laszlorpc">
+ <part id="developers.laszlorpc">
<title>OpenLaszlo RPC</title>
<xi:include href="rpc.dbk"/>
<xi:include href="rpc-javarpc.dbk"/>
@@ -120,7 +124,7 @@
<xi:include href="rpc-xmlrpc.dbk"/>
</part>
- <part id="methodology">
+ <part id="developers.methodology">
<title>Development Methodology</title>
<xi:include href="compiler.dbk"/>
<xi:include href="editing-lzx.dbk"/>
@@ -128,25 +132,12 @@
<xi:include href="lzunit.dbk"/>
</part>
- <part id="appendices">
+ <part id="developers.appendices">
<title>Appendices</title>
<xi:include href="initialization-and-instantiation.dbk"/>
<xi:include href="ecmascript-and-lzx.dbk"/>
</part>
- <!--part id="internal-documentation">
- <title>Internal Documentation</title>
- <xi:include href="chapter-template.dbk"/>
- <chapter>
- <title>Orphaned Chapters</title>
- <para><ulink url="../components/components.lzx?lzt=html">Components Hierarchy</ulink></para>
- <para><ulink url="../help/app-viewer.html">Online help</ulink></para>
- </chapter>
- </part-->
-
- <!--appendix id="schema"><title>Schema</title></appendix-->
- <!--appendix id="reserved-words"><title>Reserved words</title></appendix-->
-
<!--index/-->
<xi:include href="book-info.dbk"/>
Modified: openlaszlo/branches/legals/docs/src/developers/media-resources.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/media-resources.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/media-resources.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,530 +1,438 @@
<chapter id="media-resources">
-
-<title>Media Resources</title>
-
-<para>This chapter describes how to include external media resources (images, audio, animation, and video)
-into OpenLaszlo applications.</para>
-
-<para/><section><title>Overview</title>
-<para>LZX is designed to make it easy for you to integrate media resources into your application
-in a flexible and dynamic manner. You can include images, audio, video, and animations
-that were created using standard third-party content creation tools.
-This chapter describes the media formats that are currently supported as resources to <indexterm><primary>view</primary></indexterm><sgmltag class="element"><view></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: view-->
-s in
-OpenLaszlo 4.0. It then goes on to describes how to integrate and control
-media in your application. It concludes with some
-optimization tips.</para>
-<para>
-Note that in addition to media that can be attached as resources to views, streaming audio and video can be played by <indexterm><primary>videoview</primary></indexterm><sgmltag class="element"><videoview></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: videoview-->
-s. Please see <xref linkend="video"/> for a discussion of streaming media.
-</para>
-<para>
-For a discussion of streaming media, see <xref linkend="video"/>.
-</para>
-
-<para/></section><section><title>Supported media types</title>
-<para>
-The list of supported media types varies slightly depending on the target runtime and whether the application is to be deployed SOLO or proxied.
-</para>
-<para/><section><title condition="swf">Media for SWF SOLO applications</title>
-<para>
-SOLO applications compiled to SWF depend on Flash to load images (whereas the proxied applications get help from the transcoder on the server). This means that SOLO applications are limited to file types supported natively by Flash.</para>
-<para/><section><title>Flash 7 and Flash 8 limitations</title>
-<para>
-Flash player version 7 it can only load a limited set
-of jpegs encodings; it cannot do interleaved or progressive jpeg. If you run
-Flash player 8 it can do more wide range of jpeg encoding. Set the compiler to compile for Flash 8 as a target
-runtime to get this expanded range of image formats (also PNG and GIF).
-</para>
-<para/></section></section><section><title condition="dhtml">DHTML Limitations and workaround</title>
-<para>
-Browsers do not natively support .swf or audio or video formats. You must transcode them, omit them from your application, or embed a flash player in your application to handle them.
-</para>
-<para/><section><title>Transcoding .swf to .png</title>
-<para>
-Files in .swf format can be transcoded to .png format for display by the DHTML runtime. OpenLaszlo provides a facility, called <literal>autopng</literal>, for doing this automatically. As a convenience, the server and compiler search for a corresponding png file if a swf file is referenced in the DHTML runtime. To use this mechanism in your own code, create a png file with the same basename as the swf file, and place it in the same directory as the swf resource you want it to replace.
-</para>
-<para/></section><section><title>Audio and Video in DHTML applications</title>
-<note><para>
-The following discussion applies to audio and video resources attached to <indexterm><primary>view</primary></indexterm><sgmltag class="element"><view></sgmltag>s, not to <indexterm><primary>videoview</primary></indexterm><sgmltag class="element"><videoview></sgmltag>s. <indexterm><primary>videoview</primary></indexterm><sgmltag class="element"><videoview></sgmltag>s are not supported at all for the DHTML runtime.
-</para></note>
-<para>
-In order to display swf-formatted audio and video within a DHTML application, you may embedd a swf player in the page. For a discussion of how to do this, see <xref linkend="browser-integration"/>.
-</para>
-<para/></section></section><section><title>Summary of Supported Media</title>
-<para>
-OpenLaszlo 4.0 and above support the following media types:</para>
-<variablelist><varlistentry><term>JPEG</term><listitem><para>Depending on target runtime and mode of deployment, different .jpg and .jpeg files are supported. Progressive and interleaved files are not supported for Flash 7 SOLO deployment. See the <ulink url="http://www.w3.org/Graphics/JPEG/">W3C JPEG JFIF Specification</ulink>.
- <note><para><emphasis role="i">Progressive</emphasis> files are re-encoded in the OpenLaszlo Server.</para></note>
- </para></listitem></varlistentry><varlistentry><term>GIF</term><listitem><para>All .gif files are supported. See the <ulink url="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF Spec</ulink>.
-
- </para></listitem></varlistentry><varlistentry><term>PNG</term><listitem><para>All Portable Network Graphics files (<ulink url="http://www.w3.org/Graphics/PNG/">PNG details at W3C information</ulink>)
- are supported. This includes PNGs with alpha channels (transparency).</para></listitem></varlistentry><varlistentry><term>MP3</term><listitem><para condition="swf">For proxied applications compiled to .swf, support is limited to audio MP3 files with <emphasis role="i">sample</emphasis>-rates of 44.1 kHz, 22.050 kHz, 11.025 kHz, 8.000 kHz and 5.512 kHz.</para>
- <para>
- Flash behaves poorly with mp3s it doesn't like, which makes tracking down problems difficult. If you run into a problem, a good idea would be to find out whether your mp3 plays in a standalone Flash app separate from OpenLaszlo. (You can use the mtasc.org compiler to test this, using Flash's Sound class to load an play your mp3.) If your mp3 works does not work in standalone Flash, hen the problem is not OpenLaszlo.
- </para>
- Mp3s are not natively supported by browsers, so applications that compile to DHTML should make provisions, as described above.
- <para>
- </para></listitem></varlistentry><varlistentry><term>SWF</term><listitem><para>Macromedia Flash (SWF) files. (See <ulink url="http://www.macromedia.com/software/flash/open/licensing/fileformat/">Macromedia documentation</ulink>).</para>
- <para>For applications compiled to Flash, support is limited to SWF files that contain stills or animation only. Very limited ActionScript is allowed/supported (see below for more details).
- </para>
- <para>
- For applications compiled to DHTML, .swf format files are not supported. See above for a workaround.
- </para></listitem></varlistentry></variablelist>
-<para>
-For up-to-date discussion of supported media and considerations about their deployment in various runtimes, see the <ulink url="http://wiki.openlaszlo.org/MediaSupport">OpenLaszlo Wiki</ulink>.
-</para>
-<para/></section></section><section><title>Views and resources</title>
-<para>
-The <indexterm><primary>view</primary></indexterm><sgmltag class="element"><view></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: view-->
- is the most basic viewable
-element in an OpenLaszlo application and it is described in the chapter on <ulink url="views.html">views</ulink>.
-A view may have a <emphasis role="i">resource</emphasis> attached to it. The
-resource represents a piece of media (image, audio, video, or animation) that the
-view controls. For images, the view typically displays the image. For
-time-based media (audio, video, animation), the view can be used to start, stop, or jump
-to a specific frame or time in the media. </para>
-<para>For a simple informal introduction to attaching resources to views, see <xref linkend="art_assets"/>. The chapter you're reading now briefly
-goes over topics covered in that tutorial and then goes into greater depth.</para>
-
-
-<para>Resources may be declared directly inside a view using the view's <indexterm><primary>resource</primary></indexterm><sgmltag class="attribute">resource</sgmltag> attribute:</para>
-<example role="live-example">
- <title>Importing a resource</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/media-resources-$1.lzx"/></textobject>
- </programlisting>
-</example>
-<?example role="live-example"><title>Importing a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$1.lzx</filename><parameter/><code>
-<canvas height="110">
- <view resource="../resources/logo.gif"/>
-</canvas>
-</code></programlisting><programlisting>
-<canvas height="110">
- <view resource="../resources/logo.gif"/>
-</canvas>
-</programlisting><?lzx-edit programs/media-resources-$1.lzx></example?>
-<para>Or they may be declared externally as first-class objects themselves: </para>
-
-<example role="live-example">
- <title>Declaring a resource</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/media-resources-$2.lzx"/></textobject>
- </programlisting>
-</example>
-<?example role="live-example"><title>Declaring a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$2.lzx</filename><parameter/><code>
-<canvas height="110">
- <resource name="myname" src="../resources/logo.gif"/>
- <view resource="myname"/>
-</canvas>
-</code></programlisting><programlisting>
-<canvas height="110">
- <resource name="myname" src="../resources/logo.gif"/>
- <view resource="myname"/>
-</canvas>
-</programlisting><?lzx-edit programs/media-resources-$2.lzx></example?>
-<para/><section><title>Resources are not views</title>
-<para>
-Note that a <indexterm><primary>resource</primary></indexterm><sgmltag class="element"><resource></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: resource-->
-is <emphasis role="i">not</emphasis> itself a view.
- Resources do not have x and y positions, or background color,
-or any of the 49 or so attributes that views have. A resource that is not attached to a view is essentially invisible to the
-application. As explained below, in order to manipulate a resource, you perform actions on the view to which the resource is attached.
-</para>
-<para/></section><section><title>Summary of APIs that act on resources</title>
-<para>There are a number of view APIs (methods, fields, and events) that can
-be used to find out about and control a view's resource.</para>
-<itemizedlist spacing="compact"><listitem><para>Resource and view size, scaling and stretching:
- <itemizedlist spacing="compact"><listitem><para><structfield>LzView.resourcewidth</structfield></para></listitem><listitem><para><structfield>LzView.resourceheight</structfield></para></listitem><listitem><para><structfield>LzView.xscale</structfield></para></listitem><listitem><para><structfield>LzView.yscale</structfield></para></listitem><listitem><para><structfield>LzView.stretches</structfield></para></listitem><listitem><para><indexterm><primary><literal>LzView.stretchResource()()</literal></primary></indexterm><methodname>LzView.stretchResource()()</methodname></para></listitem><listitem><para><structfield>LzView.measureWidth()</structfield></para></listitem><listitem><para><structfield>LzView.measureHeight()</structfield></para></listitem><listitem><para><structfield>LzView.updateResourceSize()</structfield></para></listitem></itemizedlist>
- </para><para><remark role="fixme">Discuss how view and resource sizes interact (need details
- from Adam/Sarah since I'm not really sure)</remark></para>
- </listitem><listitem><para>Resource loading (discussed <link linkend="media-resources.loading">below</link>):
- <itemizedlist spacing="compact"><listitem><para><structfield>LzView.resource</structfield></para></listitem><listitem><para><indexterm><primary><literal>LzView.setSource()()</literal></primary></indexterm><methodname>LzView.setSource()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.unload()()</literal></primary></indexterm><methodname>LzView.unload()()</methodname></para></listitem><listitem><para><structfield>LzView.loadratio</structfield></para></listitem><listitem><para><structfield>LzView.framesloadratio</structfield></para></listitem><listitem><para><indexterm><primary>LzView.onload event</primary></indexterm><literal>LzView.onload</literal></para></listitem><listitem><para><indexterm><primary>LzView.onerror event</primary></indexterm><literal>LzView.onerror</literal></para></listitem><listitem><para><indexterm><primary>LzView.ontimeout event</primary></indexterm><literal>LzView.ontimeout</literal></para></listitem><listitem><para><indexterm><primary>LzView.onaddsubresource event</primary></indexterm><literal>LzView.onaddsubresource</literal></para></listitem></itemizedlist>
- </para></listitem><listitem><para>Animation/video/frames:
- <itemizedlist spacing="compact"><listitem><para><indexterm><primary><literal>LzView.play()()</literal></primary></indexterm><methodname>LzView.play()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.stop()()</literal></primary></indexterm><methodname>LzView.stop()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.seek()()</literal></primary></indexterm><methodname>LzView.seek()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getTotalTime()()</literal></primary></indexterm><methodname>LzView.getTotalTime()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getCurrentTime()()</literal></primary></indexterm><methodname>LzView.getCurrentTime()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.setResourceNumber()()</literal></primary></indexterm><methodname>LzView.setResourceNumber()()</methodname></para></listitem><listitem><para><structfield>LzView.frame</structfield></para></listitem><listitem><para><structfield>LzView.totalframes</structfield></para></listitem><listitem><para><indexterm><primary>LzView.onlastframe event</primary></indexterm><literal>LzView.onlastframe</literal></para></listitem><listitem><para><indexterm><primary>LzView.onplay event</primary></indexterm><literal>LzView.onplay</literal></para></listitem><listitem><para><indexterm><primary>LzView.onstop event</primary></indexterm><literal>LzView.onstop</literal></para></listitem></itemizedlist>
- </para></listitem><listitem><para>Audio:
- <itemizedlist spacing="compact"><listitem><para><indexterm><primary><literal>LzView.getVolume()()</literal></primary></indexterm><methodname>LzView.getVolume()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.setVolume()()</literal></primary></indexterm><methodname>LzView.setVolume()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getPan()()</literal></primary></indexterm><methodname>LzView.getPan()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.setPan()()</literal></primary></indexterm><methodname>LzView.setPan()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.play()()</literal></primary></indexterm><methodname>LzView.play()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.stop()()</literal></primary></indexterm><methodname>LzView.stop()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getTotalTime()()</literal></primary></indexterm><methodname>LzView.getTotalTime()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getCurrentTime()()</literal></primary></indexterm><methodname>LzView.getCurrentTime()()</methodname></para></listitem></itemizedlist>
- </para></listitem></itemizedlist>
-<para/></section><section><title>Resource declarations and naming</title>
-<para>
-When a resource is declared externally, it must be given a name. The namespace for resources is
-global to the entire application. Resource tags can only be used
-as direct children of either the <indexterm><primary>canvas</primary></indexterm><sgmltag class="element"><canvas></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: canvas-->
- or <indexterm><primary>library</primary></indexterm><sgmltag class="element"><library></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: library-->
- tags. </para>
-
-<para>This style of resource inclusion makes it simpler to separate out art assets from code
-and can make for improved designer/developer interactions.</para>
-
-<para>When you directly import a resource without naming it, as in the first example,
-the LZX compiler assigns a unique name to that resource.</para>
-<para>Behavior when two resources share the same name is undefined. Therefore you should take care to make sure that each resource
-has a unique and appropriate name.</para>
-
-
-<para/></section></section><section><title>Multi-frame resources</title>
-<para>Laszlo supports the notion of a resource
-<indexterm><primary>frame</primary></indexterm><sgmltag class="element"><frame></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: frame-->
-.
-A multi-frame resource is a resource that has a single name but refers
-to multiple independent pieces of media that are sequenced. Here is
-an example of declaring a multi-frame resource:
-</para>
-<example role="live-example">
- <title>Declaring a multi-frame resource</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/media-resources-$3.lzx"/></textobject>
- </programlisting>
-</example>
-<?example role="live-example"><title>Declaring a multi-frame resource</title><programlisting role="lzx-embednew"><filename>media-resources-$3.lzx</filename><parameter/><code>
-<canvas height="180">
- <resource name="myresource">
- <frame src="../resources/logo.gif"/>
- <frame src="../resources/sky.jpg"/>
- </resource>
- <simplelayout spacing="5"/>
- <view id="myview" resource="myresource"/>
- <view layout="axis: x; spacing: 3">
- <text>Frame:</text>
- <radiogroup>
- <radiobutton selected="true">1</radiobutton>
- <radiobutton>2</radiobutton>
- <handler name="onvalue" args="v">
- myview.setResourceNumber(Number(v));
- </handler>
- </radiogroup>
- </view>
-</canvas>
-</code></programlisting><programlisting>
-<canvas height="180">
- <resource name="myresource">
- <frame src="../resources/logo.gif"/>
- <frame src="../resources/sky.jpg"/>
- </resource>
- <simplelayout spacing="5"/>
- <view id="myview" resource="myresource"/>
- <view layout="axis: x; spacing: 3">
- <text>Frame:</text>
- <radiogroup>
- <radiobutton selected="true">1</radiobutton>
- <radiobutton>2</radiobutton>
- <handler name="onvalue" args="v">
- myview.setResourceNumber(Number(v));
- </handler>
- </radiogroup>
- </view>
-</canvas>
-</programlisting><?lzx-edit programs/media-resources-$3.lzx></example?>
-<para>
-You can use a multi-frame resource to construct an animation that
-moves between frames when you call the
-<interface>LzView.play()</interface> method. Conversely,
-when you import a resource that contains an animation, each frame of the
-animation automatically becomes a frame in that resource.
-In other words, art assets that contain multiple frames themselves <emphasis role="i">are</emphasis>
-multi-frame resources. Just as with multi-frame resources that are
-constructed in LZX by importing each frame individually,
-you can control the frame that is currently displayed.</para>
-
-<example role="live-example">
- <title>Importing an animation</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/media-resources-$4.lzx"/></textobject>
- </programlisting>
-</example>
-<?example role="live-example"><title>Importing an animation</title><programlisting role="lzx-embednew"><filename>media-resources-$4.lzx</filename><parameter/><code>
-<canvas height="220">
- <simplelayout spacing="5"/>
- <resource name="myresource" src="resources/logo.swf"/>
- <button onclick="me.stop()"> Stop </button>
- <button onclick="me.play()"> Play </button>
- <text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/>
- <view layout="axis: x; spacing: 4">
- <button isdefault="true" text="Set current frame: "
- onclick="me.setAttribute('frame', Number(tt.text))"/>
- <edittext id="tt" width="50"/>
- </view>
- <view id="me" resource="myresource"/>
-</canvas>
-</code></programlisting><programlisting>
-<canvas height="220">
- <simplelayout spacing="5"/>
- <resource name="myresource" src="resources/logo.swf"/>
- <button onclick="me.stop()"> Stop </button>
- <button onclick="me.play()"> Play </button>
- <text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/>
- <view layout="axis: x; spacing: 4">
- <button isdefault="true" text="Set current frame: "
- onclick="me.setAttribute('frame', Number(tt.text))"/>
- <edittext id="tt" width="50"/>
- </view>
- <view id="me" resource="myresource"/>
-</canvas>
-</programlisting><?lzx-edit programs/media-resources-$4.lzx></example?>
-<para>
-Multi-frame resources are also useful for structuring the display of a single visual element
-or component that takes on different appearances:
-</para>
-
-<example role="live-example">
- <title>Using multi-frame resources</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/media-resources-$5.lzx"/></textobject>
- </programlisting>
-</example>
-<?example role="live-example"><title>Using multi-frame resources</title><programlisting role="lzx-embednew"><filename>media-resources-$5.lzx</filename><parameter/><code>
-<canvas height="120">
- <!-- create the multi-frame resource and give it a name -->
- <resource name="mybutton_rsrc">
- <!-- first frame is the mouseup state of the button -->
- <frame src="../resources/button-up.png"/>
- <!-- second frame is the mouseover state of the button -->
- <frame src="../resources/button-over.png"/>
- <!-- third frame is the mousedown state of the button -->
- <frame src="../resources/button-down.png"/>
- </resource>
-
+ <title>Media Resources</title>
+ <para>This chapter describes how to include external media resources (images, audio, animation, and video) into OpenLaszlo applications.</para>
+ <section>
+ <title>Overview</title>
+ <para>LZX is designed to make it easy for you to integrate media resources into your application in a flexible and dynamic manner. You can include images, audio, video, and animations that were created using standard third-party content creation tools. This chapter describes the media formats that are currently supported as resources to <sgmltag class="element" role="LzView">view</sgmltag>s in OpenLaszlo 4.0. It then goes on to describes how to integrate and control media in your application. It concludes with some optimization tips.</para>
+ <para>Note that in addition to media that can be attached as resources to views, streaming audio and video can be played by <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">videoview</sgmltag>s. Please see <xref linkend="video" /> for a discussion of streaming media.</para>
+ <para>For a discussion of streaming media, see <xref linkend="video" />.</para>
+ </section>
+ <section>
+ <title>Supported media types</title>
+ <para>The list of supported media types varies slightly depending on the target runtime and whether the application is to be deployed SOLO or proxied.</para>
+ <section>
+ <title condition="swf">Media for SWF SOLO applications</title>
+ <para>SOLO applications compiled to SWF depend on Flash to load images (whereas the proxied applications get help from the transcoder on the server). This means that SOLO applications are limited to file types supported natively by Flash.</para>
+ <section>
+ <title>Flash 7 and Flash 8 limitations</title>
+ <para>Flash player version 7 it can only load a limited set of jpegs encodings; it cannot do interleaved or progressive jpeg. If you run Flash player 8 it can do more wide range of jpeg encoding. Set the compiler to compile for Flash 8 as a target runtime to get this expanded range of image formats (also PNG and GIF).</para>
+ </section>
+ </section>
+ <section>
+ <title condition="dhtml">DHTML Limitations and workaround</title>
+ <para>Browsers do not natively support .swf or audio or video formats. You must transcode them, omit them from your application, or embed a flash player in your application to handle them.</para>
+ <section>
+ <title>Transcoding .swf to .png</title>
+ <para>Files in .swf format can be transcoded to .png format for display by the DHTML runtime. OpenLaszlo provides a facility, called
+ <literal>autopng</literal>, for doing this automatically. As a convenience, the server and compiler search for a corresponding png file if a swf file is referenced in the DHTML runtime. To use this mechanism in your own code, create a png file with the same basename as the swf file, and place it in the same directory as the swf resource you want it to replace.</para>
+ </section>
+ <section>
+ <title>Audio and Video in DHTML applications</title>
+ <note><para>The following discussion applies to audio and video resources attached to <sgmltag class="element" role="LzView">view</sgmltag>s, not to <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">videoview</sgmltag>s. <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">videoview</sgmltag>s are not supported at all for the DHTML runtime.</para></note>
+ <para>In order to display swf-formatted audio and video within a DHTML application, you may embedd a swf player in the page. For a discussion of how to do this, see <xref linkend="browser-integration" />.</para>
+ </section>
+ </section>
+ <section>
+ <title>Summary of Supported Media</title>
+ <para>OpenLaszlo 4.0 and above support the following media types:</para>
+ <variablelist>
+ <varlistentry>
+ <term>JPEG</term>
+ <listitem>
+ <para>Depending on target runtime and mode of deployment, different .jpg and .jpeg files are supported. Progressive and interleaved files are not supported for Flash 7 SOLO deployment. See the <ulink url="http://www.w3.org/Graphics/JPEG/">W3C JPEG JFIF Specification</ulink>.
+ <note><para><emphasis>Progressive</emphasis> files are re-encoded in the OpenLaszlo Server.</para></note>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>GIF</term>
+ <listitem>
+ <para>All .gif files are supported. See the <ulink url="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF Spec</ulink>.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>PNG</term>
+ <listitem>
+ <para>All Portable Network Graphics files (<ulink url="http://www.w3.org/Graphics/PNG/">PNG details at W3C information</ulink>) are supported. This includes PNGs with alpha channels (transparency).</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>MP3</term>
+ <listitem>
+ <para condition="swf">For proxied applications compiled to .swf, support is limited to audio MP3 files with <emphasis>sample</emphasis>-rates of 44.1 kHz, 22.050 kHz, 11.025 kHz, 8.000 kHz and 5.512 kHz.</para>
+ <para>Flash behaves poorly with mp3s it doesn't like, which makes tracking down problems difficult. If you run into a problem, a good idea would be to find out whether your mp3 plays in a standalone Flash app separate from OpenLaszlo. (You can use the mtasc.org compiler to test this, using Flash's Sound class to load an play your mp3.) If your mp3 works does not work in standalone Flash, hen the problem is not OpenLaszlo.</para>Mp3s are not natively supported by browsers, so applications that compile to DHTML should make provisions, as described above.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>SWF</term>
+ <listitem>
+ <para>Macromedia Flash (SWF) files. (See <ulink url="http://www.macromedia.com/software/flash/open/licensing/fileformat/">Macromedia documentation</ulink>).</para>
+ <para>For applications compiled to Flash, support is limited to SWF files that contain stills or animation only. Very limited ActionScript is allowed/supported (see below for more details).</para>
+ <para>For applications compiled to DHTML, .swf format files are not supported. See above for a workaround.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>For up-to-date discussion of supported media and considerations about their deployment in various runtimes, see the
+ <ulink url="http://wiki.openlaszlo.org/MediaSupport">OpenLaszlo Wiki</ulink>.</para>
+ </section>
+ </section>
+ <section>
+ <title>Views and resources</title>
+ <para>The <sgmltag class="element" role="LzView">view</sgmltag> is the most basic viewable element in an OpenLaszlo application and it is described in <xref linkend="views" />. A view may have a <emphasis>resource</emphasis> attached to it. The resource represents a piece of media (image, audio, video, or animation) that the view controls. For images, the view typically displays the image. For time-based media (audio, video, animation), the view can be used to start, stop, or jump to a specific frame or time in the media.</para>
+ <para>For a simple informal introduction to attaching resources to views, see <xref linkend="art_assets" />. The chapter you're reading now briefly goes over topics covered in that tutorial and then goes into greater depth.</para>
+ <para>Resources may be declared directly inside a view using the view's <sgmltag class="attribute" role="LzView.__ivars__.resource">resource</sgmltag> attribute:</para>
+ <example role="live-example">
+ <title>Importing a resource</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$1.lzx" />
+ </textobject>
+ </programlisting>
+ </example><?example role="live-example"><title>Importing a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$1.lzx</filename><parameter/><code>
+ <canvas height="110">
+ <view resource="../resources/logo.gif"/>
+ </canvas>
+ </code></programlisting><programlisting>
+ <canvas height="110">
+ <view resource="../resources/logo.gif"/>
+ </canvas>
+ </programlisting><?lzx-edit programs/media-resources-$1.lzx></example?>
+ <para>Or they may be declared externally as first-class objects themselves:</para>
+ <example role="live-example">
+ <title>Declaring a resource</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$2.lzx" />
+ </textobject>
+ </programlisting>
+ </example><?example role="live-example"><title>Declaring a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$2.lzx</filename><parameter/><code>
+ <canvas height="110">
+ <resource name="myname" src="../resources/logo.gif"/>
+ <view resource="myname"/>
+ </canvas>
+ </code></programlisting><programlisting>
+ <canvas height="110">
+ <resource name="myname" src="../resources/logo.gif"/>
+ <view resource="myname"/>
+ </canvas>
+ </programlisting><?lzx-edit programs/media-resources-$2.lzx></example?>
+ <section>
+ <title>Resources are not views</title>
+ <para>Note that a <sgmltag class="element" role="LzView.__ivars__.resource">resource</sgmltag> is <emphasis>not</emphasis> itself a view. Resources do not have x and y positions, or background color, or any of the 49 or so attributes that views have. A resource that is not attached to a view is essentially invisible to the application. As explained below, in order to manipulate a resource, you perform actions on the view to which the resource is attached.</para>
+ </section>
+ <section>
+ <title>Summary of APIs that act on resources</title>
+ <para>There are a number of <sgmltag class="element">view</sgmltag> APIs (methods, fields, and events) that can be used to find out about and control a view's resource.</para>
+ <itemizedlist spacing="compact">
+ <listitem>
+ <para>Resource and view size, scaling and stretching:</para>
+ <itemizedlist spacing="compact">
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.resourcewidth">resourcewidth</sgmltag></listitem>
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.resourceheight">resourceheight</sgmltag></listitem>
+<?ignore obsolete?
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.xscale">xscale</sgmltag></listitem>
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.yscale">yscale</sgmltag></listitem>
+?>
+ <listitem><property role="LzView.stretches">stretches</property></listitem>
+ <listitem><methodname role="LzView.prototype.stretchResource">stretchResource()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.measureWidth">measureWidth()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.measureHeight">measureHeight()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.updateResourceSize">updateResourceSize()</methodname></listitem>
+ </itemizedlist>
+ <remark role="fixme">Discuss how view and resource sizes interact (need details from Adam/Sarah since I'm not really sure)</remark>
+ </listitem>
+ <listitem>
+ <para>Resource loading (discussed
+ <link linkend="media-resources.loading">below</link>):</para>
+ <itemizedlist spacing="compact">
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.resource">resource</sgmltag></listitem>
+ <listitem><methodname role="LzView.prototype.setSource">setSource()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.unload">unload()</methodname></listitem>
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.loadratio">loadratio</sgmltag></listitem>
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.framesloadratio">framesloadratio</sgmltag></listitem>
+ <listitem><property role="LzView.prototype.onload">onload</property></listitem>
+ <listitem><property role="LzView.prototype.onerror">onerror</property></listitem>
+ <listitem><property role="LzView.prototype.ontimeout">ontimeout</property></listitem>
+ <listitem><property role="LzView.prototype.onaddsubresource">onaddsubresource</property></listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Animation/video/frames:</para>
+ <itemizedlist spacing="compact">
+ <listitem><methodname role="LzView.prototype.play">play()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.stop">stop()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.seek">seek()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.getTotalTime">getTotalTime()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.getCurrentTime">getCurrentTime()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.setResourceNumber">setResourceNumber()</methodname></listitem>
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.frame">frame</sgmltag></listitem>
+ <listitem><sgmltag class="attribute" role="LzView.__ivars__.totalframes">totalframes</sgmltag></listitem>
+ <listitem><property role="LzView.prototype.onlastframe">onlastframe</property></listitem>
+ <listitem><property role="LzView.prototype.onplay">onplay</property></listitem>
+ <listitem><property role="LzView.prototype.onstop">onstop</property></listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Audio:</para>
+ <itemizedlist spacing="compact">
+ <listitem><methodname role="LzView.prototype.getVolume">getVolume()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.setVolume">setVolume()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.getPan">getPan()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.setPan">setPan()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.play">play()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.stop">stop()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.getTotalTime">getTotalTime()</methodname></listitem>
+ <listitem><methodname role="LzView.prototype.getCurrentTime">getCurrentTime()</methodname></listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Resource declarations and naming</title>
+ <para>When a resource is declared externally, it must be given a name. The namespace for resources is global to the entire application. Resource tags can only be used as direct children of either the <sgmltag class="element" role="LzCanvas">canvas</sgmltag> or <sgmltag class="element" role="tag.library">library</sgmltag> tags.</para>
+ <para>This style of resource inclusion makes it simpler to separate out art assets from code and can make for improved designer/developer interactions.</para>
+ <para>When you directly import a resource without naming it, as in the first example, the LZX compiler assigns a unique name to that resource.</para>
+ <para>Behavior when two resources share the same name is undefined. Therefore you should take care to make sure that each resource has a unique and appropriate name.</para>
+ </section>
+ </section>
+ <section>
+ <title>Multi-frame resources</title>
+ <para>Laszlo supports the notion of a resource <emphasis>frame</emphasis>. A multi-frame resource is a resource that has a single name but refers to multiple independent pieces of media that are sequenced. Here is an example of declaring a multi-frame resource:</para>
+ <example role="live-example">
+ <title>Declaring a multi-frame resource</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$3.lzx" />
+ </textobject>
+ </programlisting>
+ </example><?example role="live-example"><title>Declaring a multi-frame resource</title><programlisting role="lzx-embednew"><filename>media-resources-$3.lzx</filename><parameter/><code>
+ <canvas height="180">
+ <resource name="myresource">
+ <frame src="../resources/logo.gif"/>
+ <frame src="../resources/sky.jpg"/>
+ </resource>
+ <simplelayout spacing="5"/>
+ <view id="myview" resource="myresource"/>
+ <view layout="axis: x; spacing: 3">
+ <text>Frame:</text>
+ <radiogroup>
+ <radiobutton selected="true">1</radiobutton>
+ <radiobutton>2</radiobutton>
+ <handler name="onvalue" args="v">
+ myview.setResourceNumber(Number(v));
+ </handler>
+ </radiogroup>
+ </view>
+ </canvas>
+ </code></programlisting><programlisting>
+ <canvas height="180">
+ <resource name="myresource">
+ <frame src="../resources/logo.gif"/>
+ <frame src="../resources/sky.jpg"/>
+ </resource>
+ <simplelayout spacing="5"/>
+ <view id="myview" resource="myresource"/>
+ <view layout="axis: x; spacing: 3">
+ <text>Frame:</text>
+ <radiogroup>
+ <radiobutton selected="true">1</radiobutton>
+ <radiobutton>2</radiobutton>
+ <handler name="onvalue" args="v">
+ myview.setResourceNumber(Number(v));
+ </handler>
+ </radiogroup>
+ </view>
+ </canvas>
+ </programlisting><?lzx-edit programs/media-resources-$3.lzx></example?>
+ <para>You can use a multi-frame resource to construct an animation that moves between frames when you call the
+ <interface>LzView.play()</interface> method. Conversely, when you import a resource that contains an animation, each frame of the animation automatically becomes a frame in that resource. In other words, art assets that contain multiple frames themselves
+ <emphasis>are</emphasis> multi-frame resources. Just as with multi-frame resources that are constructed in LZX by importing each frame individually, you can control the frame that is currently displayed.</para>
+ <example role="live-example">
+ <title>Importing an animation</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$4.lzx" />
+ </textobject>
+ </programlisting>
+ </example><?example role="live-example"><title>Importing an animation</title><programlisting role="lzx-embednew"><filename>media-resources-$4.lzx</filename><parameter/><code>
+ <canvas height="220">
+ <simplelayout spacing="5"/>
+ <resource name="myresource" src="resources/logo.swf"/>
+ <button onclick="me.stop()"> Stop </button>
+ <button onclick="me.play()"> Play </button>
+ <text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/>
+ <view layout="axis: x; spacing: 4">
+ <button isdefault="true" text="Set current frame: "
+ onclick="me.setAttribute('frame', Number(tt.text))"/>
+ <edittext id="tt" width="50"/>
+ </view>
+ <view id="me" resource="myresource"/>
+ </canvas>
+ </code></programlisting><programlisting>
+ <canvas height="220">
+ <simplelayout spacing="5"/>
+ <resource name="myresource" src="resources/logo.swf"/>
+ <button onclick="me.stop()"> Stop </button>
+ <button onclick="me.play()"> Play </button>
+ <text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/>
+ <view layout="axis: x; spacing: 4">
+ <button isdefault="true" text="Set current frame: "
+ onclick="me.setAttribute('frame', Number(tt.text))"/>
+ <edittext id="tt" width="50"/>
+ </view>
+ <view id="me" resource="myresource"/>
+ </canvas>
+ </programlisting><?lzx-edit programs/media-resources-$4.lzx></example?>
+ <para>Multi-frame resources are also useful for structuring the display of a single visual element or component that takes on different appearances:</para>
+ <example role="live-example">
+ <title>Using multi-frame resources</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$5.lzx" />
+ </textobject>
+ </programlisting>
+ </example><?example role="live-example"><title>Using multi-frame resources</title><programlisting role="lzx-embednew"><filename>media-resources-$5.lzx</filename><parameter/><code>
+ <canvas height="120">
+ <!-- create the multi-frame resource and give it a name -->
+ <resource name="mybutton_rsrc">
+ <!-- first frame is the mouseup state of the button -->
+ <frame src="../resources/button-up.png"/>
+ <!-- second frame is the mouseover state of the button -->
+ <frame src="../resources/button-over.png"/>
+ <!-- third frame is the mousedown state of the button -->
+ <frame src="../resources/button-down.png"/>
+ </resource>
+
<!-- attach the resource to a view with mouse events -->
- <view resource="mybutton_rsrc"
- onmouseover="setResourceNumber(2)"
- onmouseout="setResourceNumber(1)"
- onmousedown="setResourceNumber(3)"
- onmouseup="setResourceNumber(2)"/>
-
+ <view resource="mybutton_rsrc"
+ onmouseover="setResourceNumber(2)"
+ onmouseout="setResourceNumber(1)"
+ onmousedown="setResourceNumber(3)"
+ onmouseup="setResourceNumber(2)"/>
+
</canvas>
-</code></programlisting><programlisting>
-<canvas height="120">
- <!-- create the multi-frame resource and give it a name -->
- <resource name="mybutton_rsrc">
- <!-- first frame is the mouseup state of the button -->
- <frame src="../resources/button-up.png"/>
- <!-- second frame is the mouseover state of the button -->
- <frame src="../resources/button-over.png"/>
- <!-- third frame is the mousedown state of the button -->
- <frame src="../resources/button-down.png"/>
- </resource>
-
+ </code></programlisting><programlisting>
+ <canvas height="120">
+ <!-- create the multi-frame resource and give it a name -->
+ <resource name="mybutton_rsrc">
+ <!-- first frame is the mouseup state of the button -->
+ <frame src="../resources/button-up.png"/>
+ <!-- second frame is the mouseover state of the button -->
+ <frame src="../resources/button-over.png"/>
+ <!-- third frame is the mousedown state of the button -->
+ <frame src="../resources/button-down.png"/>
+ </resource>
+
<!-- attach the resource to a view with mouse events -->
- <view resource="mybutton_rsrc"
- onmouseover="setResourceNumber(2)"
- onmouseout="setResourceNumber(1)"
- onmousedown="setResourceNumber(3)"
- onmouseup="setResourceNumber(2)"/>
-
+ <view resource="mybutton_rsrc"
+ onmouseover="setResourceNumber(2)"
+ onmouseout="setResourceNumber(1)"
+ onmousedown="setResourceNumber(3)"
+ onmouseup="setResourceNumber(2)"/>
+
</canvas>
-</programlisting><?lzx-edit programs/media-resources-$5.lzx></example?>
-
-<para/><section><title>Frame rates</title>
-<para>As of OpenLaszlo 3.1, all LZX applications are compiled to Macromedia
-Flash (SWF) files. With the exception of audio files noted below, SWF files are played by the Flash plugin at a
-fixed frame rate and all imported animations are played at that frame
-rate. This frame rate is fixed at 30 frames per
-second. </para>
-<para/><section><title>Audio rates</title>
-<para>
- Animations that include an audio soundtrack are played
-at a rate that maintains the original audio/video synchronization in
-the incoming animation.</para>
-
-<para/></section></section></section><section id="media-resources.loading"><title>Resource loading</title>
-<para>In the examples above, we've declaratively tied resources to view.
-But we haven't expressed anything about when or how the application
-should pull in the needed resource. We call this <indexterm significance="preferred"><primary>resource
-loading</primary></indexterm><glossterm>resource
-loading</glossterm> and LZX provides flexibility over how and when
-the application loads resources. The most important choice is whether
-a resource should be loaded at <glossterm>compile time</glossterm> or
-<glossterm>run time</glossterm>.</para>
-
-<para/><section><title>Compile time resources</title>
-<para>
-Resources that are loaded at compile time are included in the application
-binary and add to the initial download size of the application.</para>
-
-<example role="live-example"><title>Including a resource at compile time</title><programlisting>
- <resource name="myname" src="resources/logo.gif"/>
-</programlisting></example>
-
-<para>Compile-time resource inclusion is good for </para>
-<itemizedlist spacing="compact"><listitem><para>small assets that are fixed for the life-time of the running application.</para></listitem><listitem><para>assets that are needed by all users of an application</para></listitem></itemizedlist>
-<para>
-Examples of resources that are included at compile time include most
-of the assets associated with user-interface components.
-</para>
-<para>The LZX compiler may transcode compile-time resources for inclusion in
-the SWF application; the OpenLaszlo Server caches the results of these transcodes.
-The compiler checks the last-modified time of all compile-time-included
-resources to determine if an application needs to be recompiled.</para>
-
-<para/></section><section id="media-resources.runtime-resources"><title>Run-time resources</title>
-<para>There are two main ways to load resources at run-time. The first is to use
-special syntax that is understood by the <indexterm><primary>view</primary></indexterm><sgmltag class="element"><view></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: view-->
-'s
-<literal>resource</literal> attribute. If you specify a value for this attribute that
-is an HTTP url, the compiler assumes that this resource should be loaded at runtime:</para>
-
-<example role="live-example">
- <title>Loading a resource at runtime</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/media-resources-$7.lzx"/></textobject>
- </programlisting>
-</example>
-<?example role="live-example"><title>Loading a resource at runtime</title><programlisting role="lzx-embednew"><filename>media-resources-$7.lzx</filename><parameter/><code>
-<canvas height="180">
- <view resource="http:../resources/logo.gif"/>
-</canvas>
-</code></programlisting><programlisting>
-<canvas height="180">
- <view resource="http:../resources/logo.gif"/>
-</canvas>
-</programlisting><?lzx-edit programs/media-resources-$7.lzx></example?>
-
-<para>The second method is to use the <indexterm><primary><literal>LzView.setSource()()</literal></primary></indexterm><methodname>LzView.setSource()()</methodname> method.
-The previous example is equivalent to the following one:</para>
-
-<example role="live-example">
- <title>Loading a resource at runtime using script</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/media-resources-$8.lzx"/></textobject>
- </programlisting>
-</example>
-<?example role="live-example"><title>Loading a resource at runtime via script</title><programlisting role="lzx-embednew"><filename>media-resources-$8.lzx</filename><parameter/><code>
-<canvas height="180">
- <view oninit="this.setSource('http:../resources/logo.gif')"/>
-</canvas>
-</code></programlisting><programlisting>
-<canvas height="180">
- <view oninit="this.setSource('http:../resources/logo.gif')"/>
-</canvas>
-</programlisting><?lzx-edit programs/media-resources-$8.lzx></example?>
-
-<note><para>LZX treats HTTP URLs that omit the two slashes <literal>//</literal> after the colon (:) as being
-relative to the application.</para></note>
-<para>
-<indexterm><primary><literal>LzView.setSource()()</literal></primary></indexterm><methodname>LzView.setSource()()</methodname> provides more control over
-the loading of the resource. Using this method, you can:</para>
-<itemizedlist spacing="compact"><listitem><para>choose whether or not the server and/or client should cache the resource;</para></listitem><listitem><para>specify a URL that instructs the server to use a specific protocol to
- fetch the resource;</para></listitem><listitem><para>specify HTTP request headers that should be used when fetching the resource
- over HTTP.</para></listitem></itemizedlist>
-
-<para/><section><title>Protocols for proxied applications</title>
-<note><para>
-This section does not apply to SOLO applications.
-</para></note>
-<para>
-Before sending resources to a running, proxied, OpenLaszlo application,
-the OpenLaszlo Server first fetches (or proxies) the resource. The server uses
-the URL for the resource to determine how and where to get the resource.
-The term <emphasis role="i">back-end</emphasis> is used to refer to the server that is
-ultimately providing the resource. Depending on your
-configuration, the back-end can be the OpenLaszlo Server
-host itself. Or it may be another distinct host.
-</para>
-<para>
-The OpenLaszlo Server determines the protocol to use to communicate to the back-end
-based on the URL for the resource. By default, URLs that are to be
-loaded at runtime, that don't specify the protocol are assumed to be
-HTTP urls. OpenLaszlo supports communication to back-end hosts
-(including localhost itself) via the HTTP protocol.
-Relative HTTP URLs are thus fetched using a localhost HTTP transfer.
-</para>
-
-<para/></section><section><title>Caching</title>
-<para>
-By default, in proxied applications, media that is accessed at runtime is cached both in the
-server <emphasis role="em">and</emphasis> in the client browser. The OpenLaszlo Server uses the standard
-HTTP If-Modified-Since/Last-Modified caching mechanism specified in the <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP 1.1
-specification</ulink>.</para>
-
-<para>
-The OpenLaszlo Server actually maintains two media caches. One cache is used
-for resources that are requested at runtime. This is simply called
-the <indexterm significance="preferred"><primary>Media Cache</primary></indexterm><glossterm>Media Cache</glossterm>. It also maintains a second cache for
-resources that are compiled into applications called the <indexterm significance="preferred"><primary>Compiler
-Media Cache</primary></indexterm><glossterm>Compiler
-Media Cache</glossterm>. In general, the Compiler Media Cache settings only
-affect the speed of the OpenLaszlo compiler. The settings for the Media
-Cache can affect server performance. See <ulink url="../deploy/" type="">The Deployer's Guide</ulink>for details.
-</para>
-
-<para>
-The example below provides a text input area for you to type in urls that
-you'd like to test. To run the example, copy it into your local environment and compile it:
-</para>
-
-<example role="live-example"><title>Testing runtime resource loading</title><programlisting>
-<canvas height="400">
- <font src="helmetr.ttf" name="helvet"/>
- <simplelayout spacing="3"/>
-
- <view>
- <simplelayout axis="x" spacing="2"/>
- <text valign="middle">Type url:</text>
- <edittext width="500" id="url">http:../resources/logo.gif</edittext>
- </view>
- <text>(also try resources/logo.swf)</text>
-
- <command onselect="butt.doit();" key="['Enter']" active="true"/>
-
- <checkbox text="Cache in client" id="ccache"/>
- <checkbox text="Cache in server" id="scache"/>
-
- <button id="butt">Make request
- <handler name="onclick">
- this.doit();
- </handler>
-
- <method name="doit">
- <![CDATA[
- status.setText("Requesting: " + url.getText());
-
- // Determine caching from checkboxes
- var caching = 'none'
- if (ccache.getValue() & scache.getValue()) {
- caching = 'both';
- } else if (ccache.getValue()) {
- caching = 'clientonly';
- } else if (scache.getValue()) {
- caching = 'serveronly';
- }
-
- me.setSource(url.getText(), caching) ;
- ]]></method>
- </button>
- <button onclick="me.stop()"> Stop </button>
- <button onclick="me.play()"> Play </button>
- <text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/>
- <text multiline="true" width="200" height="100" id="status"/>
- <view id="me">
- <handler name="onload" args="e">
- status.setText('loaded: ' + e);
- </handler>
- <handler name="onerror" args="e">
- status.setText('error: ' + e);
- </handler>
- <handler name="ontimeout" args="e">
- status.setText('timeout: ' + e);
- </handler>
- </view>
-</canvas>
-</programlisting></example>
-<para/></section></section></section><section><title>Using the <image> tag</title>
-<para>
-The <indexterm><primary>image</primary></indexterm><sgmltag class="element"><image></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: image-->
- tag has the effect of declaring a view and associating a
-resource with it. This is a convenient shorthand that can make your programs easier to read and maintain. Do not confuse the <indexterm><primary>image</primary></indexterm><sgmltag class="element"><image></sgmltag> with the <indexterm><primary>img</primary></indexterm><sgmltag class="element"><img></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: img-->
-. The latter is used to include images inside HTML text and behaves like the <img> tag in HTML.
-</para>
-
-
-<para/></section></chapter>
+ </programlisting><?lzx-edit programs/media-resources-$5.lzx></example?>
+ <section>
+ <title>Frame rates</title>
+ <para>As of OpenLaszlo 3.1, all LZX applications are compiled to Macromedia Flash (SWF) files. With the exception of audio files noted below, SWF files are played by the Flash plugin at a fixed frame rate and all imported animations are played at that frame rate. This frame rate is fixed at 30 frames per second.</para>
+ <section>
+ <title>Audio rates</title>
+ <para>Animations that include an audio soundtrack are played at a rate that maintains the original audio/video synchronization in the incoming animation.</para>
+ </section>
+ </section>
+ </section>
+ <section id="media-resources.loading">
+ <title>Resource loading</title>
+ <para>In the examples above, we've declaratively tied resources to view. But we haven't expressed anything about when or how the application should pull in the needed resource. We call this <indexterm significance="preferred"><primary>resource loading</primary></indexterm><glossterm>resource loading</glossterm> and LZX provides flexibility over how and when the application loads resources. The most important choice is whether a resource should be loaded at <glossterm>compile time</glossterm> or <glossterm>run time</glossterm>.</para>
+ <section>
+ <title>Compile time resources</title>
+ <para>Resources that are loaded at compile time are included in the application binary and add to the initial download size of the application.</para>
+ <example role="live-example">
+ <title>Including a resource at compile time</title>
+ <programlisting><resource name="myname" src="resources/logo.gif"/></programlisting>
+ </example>
+ <para>Compile-time resource inclusion is good for</para>
+ <itemizedlist spacing="compact">
+ <listitem>
+ <para>small assets that are fixed for the life-time of the running application.</para>
+ </listitem>
+ <listitem>
+ <para>assets that are needed by all users of an application</para>
+ </listitem>
+ </itemizedlist>
+ <para>Examples of resources that are included at compile time include most of the assets associated with user-interface components.</para>
+ <para>The LZX compiler may transcode compile-time resources for inclusion in the SWF application; the OpenLaszlo Server caches the results of these transcodes. The compiler checks the last-modified time of all compile-time-included resources to determine if an application needs to be recompiled.</para>
+ </section>
+ <section id="media-resources.runtime-resources">
+ <title>Run-time resources</title>
+ <para>There are two main ways to load resources at run-time. The first is to use special syntax that is understood by the <sgmltag class="element" role="LzView">view</sgmltag>'s <sgmltag class="attribute" role="LzView.__ivars__.resource">resource</sgmltag> attribute. If you specify a value for this attribute that is an HTTP url, the compiler assumes that this resource should be loaded at runtime:</para>
+ <example role="live-example">
+ <title>Loading a resource at runtime</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$7.lzx" />
+ </textobject>
+ </programlisting>
+ </example><?example role="live-example"><title>Loading a resource at runtime</title><programlisting role="lzx-embednew"><filename>media-resources-$7.lzx</filename><parameter/><code>
+ <canvas height="180">
+ <view resource="http:../resources/logo.gif"/>
+ </canvas>
+ </code></programlisting><programlisting>
+ <canvas height="180">
+ <view resource="http:../resources/logo.gif"/>
+ </canvas>
+ </programlisting><?lzx-edit programs/media-resources-$7.lzx></example?>
+ <para>The second method is to use the <methodname role="LzView.prototype.setSource">setSource()</methodname> method. The previous example is equivalent to the following one:</para>
+ <example role="live-example">
+ <title>Loading a resource at runtime using script</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$8.lzx" />
+ </textobject>
+ </programlisting>
+ </example>
+ <note>
+ <para>LZX treats HTTP URLs that omit the two slashes <literal>//</literal> after the colon (:) as being relative to the application.</para>
+ </note>
+ <para><indexterm><primary>setSource</primary></indexterm><methodname role="LzView.prototype.setSource">setSource()</methodname> provides more control over the loading of the resource. Using this method, you can:</para>
+ <itemizedlist spacing="compact">
+ <listitem>
+ <para>choose whether or not the server and/or client should cache the resource;</para>
+ </listitem>
+ <listitem>
+ <para>specify a URL that instructs the server to use a specific protocol to fetch the resource;</para>
+ </listitem>
+ <listitem>
+ <para>specify HTTP request headers that should be used when fetching the resource over HTTP.</para>
+ </listitem>
+ </itemizedlist>
+ <section>
+ <title>Protocols for proxied applications</title>
+ <note>
+ <para>This section does not apply to SOLO applications.</para>
+ </note>
+ <para>Before sending resources to a running, proxied, OpenLaszlo application, the OpenLaszlo Server first fetches (or proxies) the resource. The server uses the URL for the resource to determine how and where to get the resource. The term
+ <emphasis>back-end</emphasis>is used to refer to the server that is ultimately providing the resource. Depending on your configuration, the back-end can be the OpenLaszlo Server host itself. Or it may be another distinct host.</para>
+ <para>The OpenLaszlo Server determines the protocol to use to communicate to the back-end based on the URL for the resource. By default, URLs that are to be loaded at runtime, that don't specify the protocol are assumed to be HTTP urls. OpenLaszlo supports communication to back-end hosts (including localhost itself) via the HTTP protocol. Relative HTTP URLs are thus fetched using a localhost HTTP transfer.</para>
+ </section>
+ <section>
+ <title>Caching</title>
+ <para>By default, in proxied applications, media that is accessed at runtime is cached both in the server <emphasis role="bold">and</emphasis> in the client browser. The OpenLaszlo Server uses the standard HTTP If-Modified-Since/Last-Modified caching mechanism specified in the <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP 1.1 specification</ulink>.</para>
+ <para>The OpenLaszlo Server actually maintains two media caches. One cache is used for resources that are requested at runtime. This is simply called the <indexterm significance="preferred"><primary>Media Cache</primary></indexterm><glossterm>Media Cache</glossterm>. It also maintains a second cache for resources that are compiled into applications called the <indexterm significance="preferred"><primary>Compiler Media Cache</primary></indexterm><glossterm>Compiler Media Cache</glossterm>. In general, the Compiler Media Cache settings only affect the speed of the OpenLaszlo compiler. The settings for the Media Cache can affect server performance. See <ulink url="../deploy/" type="">The Deployer's Guide</ulink> for details.</para>
+ <para>The example below provides a text input area for you to type in urls that you'd like to test. To run the example, copy it into your local environment and compile it:</para>
+ <example>
+ <title>Testing runtime resource loading</title>
+ <programlisting language="lzx">
+ <textobject>
+ <textdata fileref="programs/media-resources-$9.lzx" />
+ </textobject>
+ </programlisting>
+ </example>
+ </section>
+ </section>
+ </section>
+ <section>
+ <title>Using the <image> tag</title>
+ <para>The <sgmltag class="element" role="lz.image">image</sgmltag> tag has the effect of declaring a view and associating a resource with it. This is a convenient shorthand that can make your programs easier to read and maintain. Do not confuse the <sgmltag class="element" role="lz.image">image</sgmltag> tag with the <sgmltag class="element" role="img">img</sgmltag> tag. The latter is used to include images inside HTML text and behaves like the <img> tag in HTML.</para>
+ </section>
+</chapter>
Modified: openlaszlo/branches/legals/docs/src/developers/methods-events-attributes.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/methods-events-attributes.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/methods-events-attributes.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -715,7 +715,7 @@
<attribute name="onsomeevent" value="null"/>
</programlisting>
<para>
-Then, you had to check to see if it was a valid LzEvent before calling <indexterm><primary><literal>sendEvent()()</literal></primary></indexterm><methodname>sendEvent()()</methodname> on it. Ways of making that test look like this:</para>
+Then, you had to check to see if it was a valid LzEvent before calling <methodname role="LzEvent.prototype.sendEvent">sendEvent()</methodname> on it. Ways of making that test look like this:</para>
<programlisting>
if ( onsomeevent instanceof LzEvent) {
onsomeevent.sendEvent();
@@ -1438,7 +1438,7 @@
<para>
There are four ways of getting and setting attributes in LZX, each with benefits and drawbacks:</para>
-<itemizedlist spacing="compact"><listitem><para>Using <indexterm><primary><literal>setAttribute()()</literal></primary></indexterm><methodname>setAttribute()()</methodname> and <indexterm><primary><literal>getAttribute()()</literal></primary></indexterm><methodname>getAttribute()()</methodname></para></listitem><listitem><para>Using predefined "setters" for certain attributes, such as <indexterm><primary><literal>onx()</literal></primary></indexterm><methodname>onx()</methodname> and <indexterm><primary><literal>ony()</literal></primary></indexterm><methodname>ony()</methodname></para></listitem><listitem><para>using custom getter and setter methods, as explained above</para></listitem><listitem><para>Reading and writing attributes directly—that is, without using a setter or getter method</para></listitem></itemizedlist>
+<itemizedlist spacing="compact"><listitem><para>Using <methodname role="LzNode.prototype.setAttribute">setAttribute()</methodname> and <methodname role="LzNode.prototype.getAttribute">getAttribute()</methodname></para></listitem><listitem><para>Using predefined "setters" for certain attributes, such as <indexterm><primary><literal>onx()</literal></primary></indexterm><methodname>onx()</methodname> and <indexterm><primary><literal>ony()</literal></primary></indexterm><methodname>ony()</methodname></para></listitem><listitem><para>using custom getter and setter methods, as explained above</para></listitem><listitem><para>Reading and writing attributes directly—that is, without using a setter or getter method</para></listitem></itemizedlist>
<para/><section><title>setAttribute() and getAttribute() </title>
Modified: openlaszlo/branches/legals/docs/src/developers/persistent_connection.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/persistent_connection.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/persistent_connection.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -573,7 +573,7 @@
<para>The results of the call are returned in the connection datasource's
<literal>sendMessageDset</literal> and <literal>sendXMLDset</literal>, respectively. Both
-<indexterm><primary><literal>sendMessage()()</literal></primary></indexterm><methodname>sendMessage()()</methodname> and <indexterm><primary><literal>sendXML()()</literal></primary></indexterm><methodname>sendXML()()</methodname> send data to <glossterm>users</glossterm> and
+<methodname role="LzDatasource.prototype.sendMessage">sendMessage()</methodname> and <methodname role="LzDatasource.prototype.sendXML">sendXML()</methodname> send data to <glossterm>users</glossterm> and
<glossterm>agents</glossterm>. You can narrow that domain by using <indexterm><primary><literal>sendUserXML()</literal></primary></indexterm><methodname>sendUserXML()</methodname> and
<indexterm><primary><literal>sendAgentXML()</literal></primary></indexterm><methodname>sendAgentXML()</methodname>. Users are peer applications and agents are back-end
servers.</para>
Modified: openlaszlo/branches/legals/docs/src/developers/programs/class-1.lzx
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/programs/class-1.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/programs/class-1.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,13 +1,13 @@
<canvas height="40">
- <class name="myframe" extends="view">
+ <class name="myframe" extends="view"><?lzx-co N10086 ?>
<attribute name="bgcolor" value="red"/>
<view x="5" y="5" width="${parent.width-10}"
height="${parent.height-10}"
bgcolor="blue"/>
</class>
- <myframe width="40" height="40"/>
+ <myframe width="40" height="40"/><?lzx-co N10090 ?>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
Modified: openlaszlo/branches/legals/docs/src/developers/programs/debugging-$5.lzx
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/programs/debugging-$5.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/programs/debugging-$5.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,8 +1,8 @@
<canvas debug="true" height="150">
<handler name="oninit">
- Debug.write('subviews: ' + canvas.subviews);
- Debug.write('subviews:', canvas.subviews);
+ Debug.write('subviews: ' + canvas.subviews); <?lzx-co N10239?>
+ Debug.write('subviews:', canvas.subviews); <?lzx-co N10243?>
</handler>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Copied: openlaszlo/branches/legals/docs/src/developers/programs/media-resources-$9.lzx (from rev 5631, openlaszlo/branches/doctools/docs/src/developers/programs/media-resources-$9.lzx)
Modified: openlaszlo/branches/legals/docs/src/developers/programs/program-development-$14.lzx
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/programs/program-development-$14.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/programs/program-development-$14.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -3,12 +3,13 @@
<simplelayout/>
<!-- This is a red view -->
<view bgcolor="red" width="100" height="20"/>
- <?ignore
+
+ <?lzx-co N102A3 ?><?ignore
<!-- This is a blue view -->
<view bgcolor="blue" width="100" height="20"/>
<!-- This is a green view -->
<view bgcolor="green" width="100" height="20"/>
- ?>
+ ?><?lzx-co N102AD ?>
<!-- This is a yellow view -->
<view bgcolor="yellow" width="100" height="20"/>
</canvas>
Modified: openlaszlo/branches/legals/docs/src/developers/programs/views-$22.lzx
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/programs/views-$22.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/programs/views-$22.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -8,7 +8,7 @@
<attribute name="defaultplacement" value="mycontent" type="string"/>
<view name="mycontent" x="10" y="10" bgcolor="white"
- width="${parent.width-20}" height="${parent.height-20}">
+ width="${parent.width-20}" height="${parent.height-20}"> <?lzx-co N102AC ?>
</view>
</class>
Modified: openlaszlo/branches/legals/docs/src/developers/programs/views-$4.lzx
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/programs/views-$4.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/programs/views-$4.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,9 +1,9 @@
<canvas height="60" width="500">
- <view width="50" height="50" bgcolor="red"/>
- <view width="50" height="50"/>
- <view width="0" height="50" bgcolor="blue"/>
- <view resource="../images/logo.png"/>
+ <view width="50" height="50" bgcolor="red"/> <?lzx-co N10058 ?>
+ <view width="50" height="50"/> <?lzx-co N1005B ?>
+ <view width="0" height="50" bgcolor="blue"/> <?lzx-co N1005E ?>
+ <view resource="../images/logo.png"/> <?lzx-co N10061 ?>
<simplelayout axis="x" spacing="5"/>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Modified: openlaszlo/branches/legals/docs/src/developers/rpc-soap.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/rpc-soap.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/rpc-soap.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -99,7 +99,7 @@
<para>Note that <literal>proxy</literal> is not defined until the <literal>onload </literal>event is sent, thus
function stubs cannot be invoked until <literal>onload.</literal> Each function stub requires two
arguments: an array of parameters and delegate. You can unload it (i.e., set to
-null) by calling the <indexterm><primary><literal>unload()()</literal></primary></indexterm><methodname>unload()()</methodname> method. Go to the proxy section in the RPC chapter
+null) by calling the <methodname>unload()</methodname> method. Go to the proxy section in the RPC chapter
for details.</para>
Modified: openlaszlo/branches/legals/docs/src/developers/rpc.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/rpc.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/rpc.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -835,7 +835,7 @@
<para/></section></section><section><title>Using dataobject to map return values</title>
<para>There is more convenient way to generate data mapped return values. Instead
-of calling <indexterm><primary><literal>LzDataElement.valueToElement()()</literal></primary></indexterm><methodname>LzDataElement.valueToElement()()</methodname> after each call, a <literal>dataobject</literal> property
+of calling <methodname role="LzDataElement.prototype.valueToElement">valueToElement()</methodname> after each call, a <literal>dataobject</literal> property
can be set in the delegate. <indexterm significance="preferred"><primary>Dataobject</primary></indexterm><glossterm>Dataobject</glossterm> must be a dataset or an
LzDataElement and tells the RPC function to create a data mapped return value
and set it on the dataobject. If the dataobject is a dataset, the child nodes of
Modified: openlaszlo/branches/legals/docs/src/developers/survey-chapter.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/survey-chapter.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/survey-chapter.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -176,7 +176,7 @@
</literal>
</programlisting>
<para>
-The function of this tag is to associate the form with the dataset. Later, when the <indexterm><primary><literal>submit()()</literal></primary></indexterm><methodname>submit()()</methodname> is invoked,
+The function of this tag is to associate the form with the dataset. Later, when the <methodname role="LzDataset.prototype.submit">submit()</methodname> is invoked,
the data will be sent to the server.
</para>
<para/></section></section><section><title>Extending the <alert> component</title>
Modified: openlaszlo/branches/legals/docs/src/developers/text.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/text.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/text.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -537,7 +537,7 @@
then it will be sized to the height of the current font.
</para>
<para>Setting the <indexterm><primary>resize</primary></indexterm><sgmltag class="attribute">resize</sgmltag> on a text field will cause it to be resized to
-fit its text content at runtime, whenever the <indexterm><primary><literal>setText()()</literal></primary></indexterm><methodname>setText()()</methodname> method is called.
+fit its text content at runtime, whenever the <methodname role="LzText.prototype.setText">setText()</methodname> method is called.
</para>
<para>
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/art_assets.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/art_assets.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/art_assets.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="art_assets">
+<?dbhtml dir="tutorials" ?>
<title>Introduction to Media and Art Assets</title>
<para>This tutorial provides an informal overview of how to use media resources such
@@ -10,26 +11,26 @@
<para>
In this tutorial we'll be talking about using resources attached to views, which is the more general mechanism. This technique allows you to import not only images, but audio, video "progressive" images and similar complex media.
</para>
-<para/><section><title>Runtime Considerations</title>
+<section><title>Runtime Considerations</title>
<para>Depending on which runtime (SWF or DHTML) you're compiling to and whether your application is deployed proxied or SOLO, there may be certain types of assets that may be available. For example, in applications deployed to SWF, you can use assets in SWF format, these are not available in applications compiled to DHTML. Additionally, various formats that are not natively supported by the Flash Player are available only when you run in proxied mode, in which the OpenLaszlo Server transcodes formats.
</para>
<para>
-When you insert an image into HTML text, you can only include images in the formats natively supported by the targeted runtime. For a discussion of how to use the <indexterm><primary>img</primary></indexterm><sgmltag class="element"><img></sgmltag><remark role="fixme">[unknown tag]</remark>
+When you insert an image into HTML text, you can only include images in the formats natively supported by the targeted runtime. For a discussion of how to use the <sgmltag class="element" role="img">img</sgmltag>
<!--unknown tag: img-->
tag within HTML text, see <xref linkend="text"/>.
</para>
<para>Being able to bring in art assets is not just for pictures - you can create your own custom view system too.</para>
-<para/></section><section id="art_assets.basics"><title>Resources</title>
+</section><section id="art_assets.basics"><title>Resources</title>
<para>
-In OpenLaszlo applications, <indexterm><primary>view</primary></indexterm><sgmltag class="element"><view></sgmltag><remark role="fixme">[unknown tag]</remark>
+In OpenLaszlo applications, <sgmltag class="element" role="LzView">view</sgmltag>
<!--unknown tag: view-->
s are the fundamental visible entities, and resources
are externally generated media to be incorporated in applications. Resources are made available by being
attatched to views. Thus in OpenLaszlo applications you don't "insert an image" into a view;
-instead you insert a view whose <emphasis role="i">resource</emphasis> is an image.
+instead you insert a view whose <emphasis>resource</emphasis> is an image.
</para>
<para>Let's look at the simplest way of including an art asset (resource).
@@ -77,11 +78,11 @@
-<para/></section><section id="art_assets.including"><title>Ways to include resources</title>
+</section><section id="art_assets.including"><title>Ways to include resources</title>
<para>In the example above, we included an image from the current local directory that was loaded when the application was compiled on the server. This may or may not be right for the particular application, so LZX has four ways to load images:</para>
-<para/><section><title>Loading resources at compile time</title>
+<section><title>Loading resources at compile time</title>
<para>The resource gets bundled with the rest of the application when it is compiled on the server, so there will be a larger initial download, but the images will display instantly.</para>
<para>All of these four methods will eventually show the same result on screen:</para>
@@ -100,7 +101,7 @@
</programlisting></example>
-<para/></section><section><title>Loading resources at run-time</title>
+</section><section><title>Loading resources at run-time</title>
<para>The resource does not get loaded until the view is initialized, so the rest of the application will load and there may be a visible delay. The initial download will be smaller, because the images are not bundled with it. The server that does the compiling requests the image (if it resides on a different server), and it routes it to the app that is already running in the client.</para>
<example role="live-example"><title>Absolute referencing</title><programlisting>
@@ -115,14 +116,10 @@
</canvas>
</programlisting></example>
-<para>The best way to include a resources that are part of your application
-is usually with the global identifier (using the <indexterm><primary>resource</primary></indexterm><sgmltag class="element"><resource></sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: resource-->
- tag). That way all resources
- can be included in one place, and if you need to change a resource's location or the resource itself, you only
-need to change it once. (Reasons to use other ways of including resources are described in later chapters.)</para>
+<para>The best way to include a resources that are part of your application is usually with the global identifier (using the <sgmltag class="element" role="resource">resource</sgmltag> tag). That way all resources can be included in one place, and if you need to change a resource's location or the resource itself, you only need to change it once. (Reasons to use other ways of including resources are described in later chapters.)</para>
+</section></section>
-<para/></section></section><section id="art_assets.types"><title>File types</title>
+<section id="art_assets.types"><title>File types</title>
<example role="live-example">
<title>Stretching resources</title>
@@ -156,7 +153,7 @@
<para> OpenLaszlo supports GIFs, JPEGs and PNGs. They can all be resized by setting the <indexterm><primary>stretches</primary></indexterm><sgmltag class="attribute">stretches</sgmltag> attribute of the view that contains the resource to <literal>both</literal>, <literal>width</literal> or <literal>height</literal>.</para>
-<para/></section><section id="art_assets.multiframe"><title>Multi-frame Resources</title>
+</section><section id="art_assets.multiframe"><title>Multi-frame Resources</title>
<para>Resources can be multi frame, meaning that a single resource is actually made up of a number of different resources, each of which can only be shown one at a time.</para>
@@ -191,9 +188,9 @@
</programlisting><?lzx-edit programs/art_assets-$8.lzx></example?>
<para>The resources nested within the resource tag are numbered starting with 1.</para>
-<para>As you can see, OpenLaszlo supports GIFs, JPEGs and PNGs. They can all be resized by setting the <indexterm><primary>stretches</primary></indexterm><sgmltag class="attribute">stretches</sgmltag> attribute of the view that contains the resource to either <literal>both</literal>, <literal>width</literal> or <literal>height</literal>.</para>
+<para>As you can see, OpenLaszlo supports GIFs, JPEGs and PNGs. They can all be resized by setting the <sgmltag class="attribute" role="LzView.stretches">stretches</sgmltag> attribute of the view that contains the resource to either <literal>both</literal>, <literal>width</literal> or <literal>height</literal>.</para>
-<para/></section><section id="art_assets.swfs"><title condition="swf">Working with SWFs</title>
+</section><section id="art_assets.swfs"><title condition="swf">Working with SWFs</title>
<para>In applications compiled to SWF, you can treat SWF-formatted assets as resources, whether they are animated or not:</para>
@@ -203,19 +200,8 @@
<textobject><textdata fileref="programs/art_assets-$9.lzx"/></textobject>
</programlisting>
</example>
-<?example role="live-example"><title>Working with swf files</title><programlisting role="lzx-embednew"><filename>art_assets-$9.lzx</filename><parameter/><code>
-<canvas width="500" height="100">
- <view resource="../resources/still_swf.swf"/>
- <view x="150" y="20" resource="../resources/anim_swf.swf"/>
-</canvas>
-</code></programlisting><programlisting>
-<canvas width="500" height="100">
- <view resource="../resources/still_swf.swf"/>
- <view x="150" y="20" resource="../resources/anim_swf.swf"/>
-</canvas>
-</programlisting><?lzx-edit programs/art_assets-$9.lzx></example?>
-<para>Any animation will loop <emphasis role="i">ad infinitum</emphasis>. You will probably want to control the animation of a SWF file from the script in your application. To prevent it from playing, we can tell it to stop when the view is initialized:</para>
+<para>Any animation will loop <emphasis>ad infinitum</emphasis>. You will probably want to control the animation of a SWF file from the script in your application. To prevent it from playing, we can tell it to stop when the view is initialized:</para>
<programlisting><view x="150" y="20" resource="anim_swf.swf" <emphasis role="em">oninit="this.stop();"</emphasis>/></programlisting>
@@ -225,33 +211,31 @@
<textobject><textdata fileref="programs/art_assets-$10.lzx"/></textobject>
</programlisting>
</example>
-<?example role="live-example"><title>Stopping swf animations</title><programlisting role="lzx-embednew"><filename>art_assets-$10.lzx</filename><parameter/><code>
-<canvas width="500" height="150">
- <view name="spinningClock" resource="../resources/clock.swf"
- onclick="this.stop();"
- clickable="true"/>
-</canvas>
-</code></programlisting><programlisting>
-<canvas width="500" height="150">
- <view name="spinningClock" resource="../resources/clock.swf"
- onclick="this.stop();"
- clickable="true"/>
-</canvas>
-</programlisting><?lzx-edit programs/art_assets-$10.lzx></example?>
-<para>Clicking on the image will cause the animation to stop. The <indexterm><primary>onclick event</primary></indexterm><literal>onclick</literal> event handler will be covered in the "Scripting" tutorial.</para>
+<para>Clicking on the image will cause the animation to stop. The <property role="LzView.prototype.onclick">onclick</property> event handler will be covered in the "Scripting" tutorial.</para>
-<para>Instead of just using <indexterm><primary><literal>stop()</literal></primary></indexterm><methodname>stop()</methodname>, we could have passed the <indexterm><primary><literal>stop()</literal></primary></indexterm><methodname>stop()</methodname> method an argument instructing it at which frame to stop.
- In addition, we could have used the <indexterm><primary><literal>play()</literal></primary></indexterm><methodname>play()</methodname> method (also with optional frame argument) to play from a given frame.</para>
+<para>Instead of just using <methodname role="LzView.prototype.stop">stop()</methodname>, we could have passed the <methodname role="LzView.prototype.stop">stop()</methodname> method an argument instructing it at which frame to stop.
+ In addition, we could have used the <methodname role="LzView.prototype.play">play()</methodname> method (also with optional frame argument) to play from a given frame.</para>
<para>We can't really progress beyond this point without covering scripting, but here is a preview of some of
the other
- attributes and methods of <indexterm><primary>view</primary></indexterm><sgmltag class="element"><view></sgmltag>s that pertain to resources:</para>
+ attributes and methods of <sgmltag class="element" role="LzView">view</sgmltag>s that pertain to resources:</para>
-<variablelist><varlistentry><term><indexterm><primary>view.playing</primary></indexterm><sgmltag class="attribute">view.playing</sgmltag></term><listitem>
- <para>An attribute that is true if the SWF is currently playing; false if it is stopped.</para></listitem></varlistentry><varlistentry><term><indexterm><primary>view.frame</primary></indexterm><sgmltag class="attribute">view.frame</sgmltag></term><listitem>
- <para>The number of the current frame.</para></listitem></varlistentry><varlistentry><term><indexterm><primary>view.totalframes</primary></indexterm><sgmltag class="attribute">view.totalframes</sgmltag></term><listitem>
- <para>The total number of frames in the SWF.</para></listitem></varlistentry><varlistentry><term><literal>view.seek(n)</literal></term><listitem>
- <para>Jumps forward or backward <emphasis role="i">n</emphasis> seconds through the SWF.</para></listitem></varlistentry></variablelist>
+<variablelist>
+<?ignore no longer supported?
+ <varlistentry><term><sgmltag class="attribute" role="LzView.__ivars__.playing">playing</sgmltag></term>
+ <listitem><para>An attribute that is true if the SWF is currently playing; false if it is stopped.</para></listitem>
+ </varlistentry>
+?>
+ <varlistentry><term><sgmltag class="attribute" role="LzView.__ivars__.frame">frame</sgmltag></term>
+ <listitem><para>The number of the current frame.</para></listitem>
+ </varlistentry>
+ <varlistentry><term><sgmltag class="attribute" role="LzView.__ivars__.totalframes">totalframes</sgmltag></term>
+ <listitem><para>The total number of frames in the SWF.</para></listitem>
+ </varlistentry>
+ <varlistentry><term><methodname role="LzView.prototype.seek">seek</methodname></term>
+ <listitem><para>Jumps forward or backward <emphasis>n</emphasis> seconds through the SWF.</para></listitem>
+ </varlistentry>
+</variablelist>
<para>These and other APIs are discussed in greater detail in <xref linkend="media-resources"/>.</para>
-<para/></section></chapter>
+</section></chapter>
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/calculator.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/calculator.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/calculator.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="calculator">
+<?dbhtml dir="tutorials" ?>
<title>Building a Calculator</title>
<para/><section><title>Introduction</title>
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/classes.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/classes.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/classes.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="classes-tutorial">
+<?dbhtml dir="tutorials" ?>
<title>Introduction to Classes and Object Oriented Programming</title>
<para/><section id="classes-tutorial.basics"><title>Introduction</title>
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/data.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/data.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/data.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="data-tutorial">
+<?dbhtml dir="tutorials" ?>
<title>Introduction to Databinding</title>
<para/><section><title>Introduction</title>
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/drawview-intro.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/drawview-intro.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/drawview-intro.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="drawview-intro">
+<?dbhtml dir="tutorials" ?>
<title>Introduction to Drawing</title>
@@ -74,9 +75,14 @@
</para>
<example role="live-example">
<title>Stroking the line</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/drawview-intro-$3.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/drawview-intro-$3.lzx"/></textobject>
+ </programlisting>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/drawview[1]/handler[1]/text()"/>
+ </areaspec>
+ </programlistingco>
</example>
<?example role="live-example"><title>stroking the line</title><programlisting role="lzx-embednew"><filename>drawview-intro-$3.lzx</filename><parameter/><code>
<canvas height="200" proxied="false">
@@ -102,7 +108,7 @@
</canvas>
</programlisting><?lzx-edit programs/drawview-intro-$3.lzx></example?>
<para>
-The <indexterm><primary><literal>closePath()()</literal></primary></indexterm><methodname>closePath()()</methodname> method draws a line back to the beginning of the current path:
+The <methodname role="drawview.__ivars__.closePath">closePath</methodname> method draws a line back to the beginning of the current path:
</para>
<example role="live-example">
<title>Stroking the line</title>
@@ -222,7 +228,7 @@
</para>
<para>
A <literal>fillStyle</literal> can be a color gradient, that is, a pattern that blends colors over its area. To use a gradient, first create it using the appropriate (linear or radial) constructor function, then set the <literal>fillStyle</literal> to be the gradient. A gradient is an object of the type <indexterm><primary>LzCanvasGradient</primary></indexterm><classname>LzCanvasGradient</classname>; you define
-the parameters of the gradient by using methods such as <indexterm><primary><literal>addColorStop()()</literal></primary></indexterm><methodname>addColorStop()()</methodname> on it. <indexterm><primary><literal>addColorStop()()</literal></primary></indexterm><methodname>addColorStop()()</methodname> takes two arguments: the number of the stop,
+the parameters of the gradient by using methods such as <methodname role="drawview.prototype.addColorStop">addColorStop</methodname> on it. <methodname role="lz.drawview.prototype.addColorStop">addColorStop</methodname> takes two arguments: the number of the stop,
and the color.
</para>
<example role="live-example">
@@ -332,7 +338,7 @@
</para>
<para/></section><section><title>Starting Over</title>
<para>
-We've said that drawing a line is like moving a pen. So, how do you pick up the pen in order to move it to another spot on the canvas? Use the <indexterm><primary><literal>beginPath()()</literal></primary></indexterm><methodname>beginPath()()</methodname>
+We've said that drawing a line is like moving a pen. So, how do you pick up the pen in order to move it to another spot on the canvas? Use the <methodname role="lz.drawview.prototype.beginPath">beginPath</methodname>
method.
</para>
<example role="live-example">
@@ -429,7 +435,7 @@
API is procedural, it's simple to blend the procedural drawing API with the declarative LZX style. The
following little program illustrates this. The <literal>r</literal> attribute is modulated in by an <indexterm><primary>animator</primary></indexterm><sgmltag class="element"><animator></sgmltag><remark role="fixme">[unknown tag]</remark>
<!--unknown tag: animator-->
- element; when <literal>r </literal>changes, the <indexterm><primary><literal>redraw()()</literal></primary></indexterm><methodname>redraw()()</methodname>
+ element; when <literal>r </literal>changes, the <methodname role="lz.drawview.prototype.redraw">redraw</methodname>
method is evoked.
</para>
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/laszlo_basics.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/laszlo_basics.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/laszlo_basics.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="laszlo_basics">
+<?dbhtml dir="tutorials" ?>
<title>OpenLaszlo Basics</title>
@@ -187,9 +188,17 @@
<example role="live-example">
<title>Manually positioning text</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/laszlo_basics-$7.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/text[1]/@x"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/text[1]/@y"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/text[2]/@x"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/text[2]/@y"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/laszlo_basics-$7.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Manually positioning text</title><programlisting role="lzx-embednew"><filename>laszlo_basics-$7.lzx</filename><parameter/><code>
<canvas width="500" height="250">
@@ -216,9 +225,14 @@
<example role="live-example">
<title>Simplelayout</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/laszlo_basics-$8.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/simplelayout[1]"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/laszlo_basics-$8.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Simplelayout</title><programlisting role="lzx-embednew"><filename>laszlo_basics-$8.lzx</filename><parameter/><code>
<canvas width="500" height="350">
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/programs/drawview-intro-$3.lzx
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/programs/drawview-intro-$3.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/programs/drawview-intro-$3.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,14 +1,13 @@
-
- <canvas height="200" proxied="false">
- <drawview>
- <handler name="oninit">
- this.moveTo(100,100)
- this.lineTo(200,100)
- this.quadraticCurveTo(120, 200, 300, 100)
- this.stroke()
- </handler>
- </drawview>
- </canvas>
+<canvas height="200" proxied="false">
+ <drawview>
+ <handler name="oninit">
+ this.moveTo(100,100);
+ this.lineTo(200,100);
+ this.quadraticCurveTo(120, 200, 300, 100);
+ this.stroke();
+ </handler>
+ </drawview>
+</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/scripting.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/scripting.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/scripting.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="scripting-tutorial">
+<?dbhtml dir="tutorials" ?>
<title>Introduction to Scripting</title>
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/text.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/text.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/text.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="text-tutorial">
+<?dbhtml dir="tutorials" ?>
<title>Introduction to Text and Fonts</title>
<para/><section><title>Introduction</title>
@@ -43,9 +44,16 @@
<example role="live-example">
<title><text> is a <view></title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/text-tutorial-$2.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/text[1]/@x"/>
+ <area units="other" otherunits="/canvas[1]/text[1]/@y"/>
+ <area units="other" otherunits="/canvas[1]/text[1]/@width"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/text-tutorial-$2.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title><text> is a <view></title><programlisting role="lzx-embednew"><filename>text-tutorial-$2.lzx</filename><parameter/><code>
<canvas height="100" width="500">
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/views.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/views.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/views.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,4 +1,5 @@
<chapter id="views-tutorial">
+<?dbhtml dir="tutorials" ?>
<title>Introduction to Views</title>
<para/><section><title>Introduction</title>
@@ -56,9 +57,14 @@
<example role="live-example">
<title>Constraining button position relative to window</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$2.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[1]/@x"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$2.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Constraining button position relative to window</title><programlisting role="lzx-embednew"><filename>views-tutorial-$2.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -109,9 +115,14 @@
<example role="live-example">
<title>Centering the button</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$3.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[1]/@width"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$3.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Centering the button</title><programlisting role="lzx-embednew"><filename>views-tutorial-$3.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -144,9 +155,14 @@
<example role="live-example">
<title>A button that stays centered</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$4.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[1]/@x"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$4.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>A button that stays centered</title><programlisting role="lzx-embednew"><filename>views-tutorial-$4.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -184,9 +200,14 @@
<example role="live-example">
<title>Growing button</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$5.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[1]/@onclick"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$5.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Growing button</title><programlisting role="lzx-embednew"><filename>views-tutorial-$5.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -235,9 +256,16 @@
<example role="live-example">
<title>Vertically aligned buttons</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$6.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[1]"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[2]"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[3]"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$6.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Vertically aligned buttons</title><programlisting role="lzx-embednew"><filename>views-tutorial-$6.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -282,9 +310,14 @@
<example role="live-example">
<title>Grouping buttons in a <view></title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$7.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/view[1]"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$7.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Grouping buttons in a <view></title><programlisting role="lzx-embednew"><filename>views-tutorial-$7.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -342,9 +375,14 @@
<example role="live-example">
<title>Constraining a width to a parent's width</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$8.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/view[1]/@width"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$8.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Constraining a width to parent's width</title><programlisting role="lzx-embednew"><filename>views-tutorial-$8.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -392,9 +430,15 @@
<example role="live-example">
<title>Constraining veiw to child's height</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$9.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/view[1]/@height"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[1]/@name"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$9.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Constraining view to child's height</title><programlisting role="lzx-embednew"><filename>views-tutorial-$9.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -446,9 +490,14 @@
<example role="live-example">
<title>Using the 'valign' attribute</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$10.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/button[1]/@valign"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$10.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Using the 'valign' attribute</title><programlisting role="lzx-embednew"><filename>views-tutorial-$10.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -504,9 +553,15 @@
<example role="live-example">
<title>Applying 'valign' to container view</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$11.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/view[1]/@height"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/view[1]/view[1]"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$11.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Applying 'valign' to container view</title><programlisting role="lzx-embednew"><filename>views-tutorial-$11.lzx</filename><parameter/><code>
<canvas height="300" width="500">
@@ -569,9 +624,15 @@
<example role="live-example">
<title>Using <simplelayout> to align buttons</title>
- <programlisting language="lzx">
- <textobject><textdata fileref="programs/views-tutorial-$12.lzx"/></textobject>
- </programlisting>
+ <programlistingco>
+ <areaspec>
+ <area units="other" otherunits="/canvas[1]/window[1]/view[1]/@bgcolor"/>
+ <area units="other" otherunits="/canvas[1]/window[1]/view[1]/view[1]/simplelayout[1]"/>
+ </areaspec>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="programs/views-tutorial-$12.lzx"/></textobject>
+ </programlisting>
+ </programlistingco>
</example>
<?example role="live-example"><title>Using <simplelayout> to align buttons</title><programlisting role="lzx-embednew"><filename>views-tutorial-$12.lzx</filename><parameter/><code>
<canvas height="300" width="500">
Modified: openlaszlo/branches/legals/docs/src/developers/tutorials/window.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/developers/tutorials/window.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/developers/tutorials/window.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -68,7 +68,14 @@
<informalfigure><mediaobject><imageobject><imagedata fileref="img/d_t_window_4.jpg"/></imageobject></mediaobject></informalfigure>
-<example role="live-example"><title>Using <simplelayout> to position art</title><programlisting role="lzx-embednew"><filename>window-tutorial-$2.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Using <simplelayout> to position art</title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$2.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>Using <simplelayout> to position art</title><programlisting role="lzx-embednew"><filename>window-tutorial-$2.lzx</filename><parameter/><code>
<canvas width="800" height="400">
<view name="mediaWindow"
x="10" y="10"
@@ -134,13 +141,20 @@
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$2.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$2.lzx></example?>
<para>OK that doesn't look great, but the art assets are all in there, the views are named, so we're ready to go!</para>
<para>Recall that we said that the x-coordinate of the <emphasis role="i">topCenter</emphasis> view was the width of the <emphasis role="i">topLeft</emphasis> view? We're going to use that principle right in the x-attributes of the views.</para>
-<example role="live-example"><title>Setting x attributes</title><programlisting role="lzx-embednew"><filename>window-tutorial-$3.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Setting x attributes</title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$3.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>Setting x attributes</title><programlisting role="lzx-embednew"><filename>window-tutorial-$3.lzx</filename><parameter/><code>
<canvas width="800" height="100">
<view name="mediaWindow"
x="10" y="10"
@@ -220,7 +234,7 @@
-->
</view>
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$3.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$3.lzx></example?>
<para>One thing we forgot about was the change the y value for the <varname>topCenter</varname> and <varname>topRight</varname> views: They are both shorter than the first one (by 10px), so we can just give them both a y-value of 10. We could be really clever and give them a dynamic y-value, but that's not really necessary here.</para>
@@ -228,7 +242,14 @@
<para>We also had to set its width to be dependant on the widths of its neigboring two views, and that of its parent. There is no need to specify the widths of <varname>topLeft</varname> or <varname>topRight</varname>, as they shall take on the widths of their resources.</para>
-<example role="live-example"><title>Stretchable widths</title><programlisting role="lzx-embednew"><filename>window-tutorial-$4.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Stretchable widths</title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$4.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>Stretchable widths</title><programlisting role="lzx-embednew"><filename>window-tutorial-$4.lzx</filename><parameter/><code>
<canvas width="800" height="100">
<view name="mediaWindow"
x="10" y="10"
@@ -286,13 +307,20 @@
-->
</view>
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$4.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$4.lzx></example?>
<para>That's fixed now. </para>
<para>The system we used to constrain the elements of the top of the view together is not actually necessary in this case. The idea of three neighboring views, where the outer two are fixed width, and the center one stretches is very common, so Laszlo allows for a shorthand way of doing that. For the body and bottom row, we shall be using this shorthand system, but you are encouraged to use it whenever possible, because it is faster.</para>
-<example role="live-example"><title>Constraining widths</title><programlisting role="lzx-embednew"><filename>window-tutorial-$5.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Constraining widths</title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$5.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>Constraining widths</title><programlisting role="lzx-embednew"><filename>window-tutorial-$5.lzx</filename><parameter/><code>
<canvas width="800" height="400">
<view name="mediaWindow"
x="10" y="10"
@@ -378,7 +406,7 @@
</view>
</view>
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$5.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$5.lzx></example?>
<para>The shorthand method in question is the tag <literal>stableborderlayout</literal>. It takes one attribute, <indexterm><primary>axis</primary></indexterm><sgmltag class="attribute">axis</sgmltag> which determines which way to space the elements. It has an optional spacing attribute too, but we're not using that right now.</para>
@@ -388,7 +416,14 @@
<!--unknown tag: view-->
tag. This is because we haven't yet told it to stretch (or in this particular case, compress) the art assets.</para>
-<example role="live-example"><title>completing the layout</title><programlisting role="lzx-embednew"><filename>window-tutorial-$6.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Completing the layout</title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$6.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>completing the layout</title><programlisting role="lzx-embednew"><filename>window-tutorial-$6.lzx</filename><parameter/><code>
<canvas width="800" height="250">
<view name="mediaWindow"
x="10" y="10"
@@ -486,7 +521,7 @@
<emphasis role="em"><stableborderlayout axis="y"/></emphasis>
</view>
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$6.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$6.lzx></example?>
<para>We had to set the views to stretch, and set their heights to their parent view, in this case, <varname>body</varname>. The body height is now governed by the <indexterm><primary>stableborderlayout</primary></indexterm><sgmltag class="element"><stableborderlayout></sgmltag><remark role="fixme">[unknown tag]</remark>
<!--unknown tag: stableborderlayout-->
@@ -501,7 +536,14 @@
<para>It's important to understand mouse events for this. When something is dragged, two mouse events happen: <emphasis role="em">First</emphasis> the mouse is pressed down (not <emphasis role="em">clicked</emphasis> — clicked is down, then up), <emphasis role="em">second</emphasis> the mouse is lifted up. So in short what we shall be doing is listening for the mouse to go down (on the menu), at which point we will move the window relative to the current mouse position. Then when we hear that the mouse has gone back up, we will stop repositioning the window.</para>
-<example role="live-example"><title>Making window Draggable</title><programlisting role="lzx-embednew"><filename>window-tutorial-$7.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Making window Draggable</title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$7.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>Making window Draggable</title><programlisting role="lzx-embednew"><filename>window-tutorial-$7.lzx</filename><parameter/><code>
<canvas width="800" height="200">
<view name="mediaWindow"
x="10" y="10"
@@ -611,7 +653,7 @@
</view>
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$7.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$7.lzx></example?>
<para>We're using the <indexterm><primary>dragstate</primary></indexterm><sgmltag class="element"><dragstate></sgmltag><remark role="fixme">[unknown tag]</remark>
<!--unknown tag: dragstate-->
@@ -637,7 +679,14 @@
<para>Therefore we need to record the offsets (x and y) when the mouse is depressed. We can't just create variables, because the method that will handle the resizing (<indexterm><primary><literal>adjustSize()</literal></primary></indexterm><methodname>adjustSize()</methodname>, see above) will not be the same as the method that is called when the mouse is depressed. So the solution is to assign the offsets as properties of the window every time the window is set.</para>
-<example role="live-example"><title>Using <dragstate></title><programlisting role="lzx-embednew"><filename>window-tutorial-$8.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Using <dragstate></title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$8.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>Using <dragstate></title><programlisting role="lzx-embednew"><filename>window-tutorial-$8.lzx</filename><parameter/><code>
<canvas width="800" height="300">
<view name="mediaWindow"
x="10" y="10"
@@ -799,7 +848,8 @@
</method></emphasis>
</view>
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$8.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$8.lzx></example?>
+
<para>First we assign the offset properties to the window. Next, we create the delegate (testing first to make sure it does not already exist). The delegate becomes a attribute of the window (<literal>this.sizerDel = new...</literal>). When we create a delegate, we have to pass it the context (<literal>this</literal>), the method to call (<indexterm><primary><literal>adjustSize()</literal></primary></indexterm><methodname>adjustSize()</methodname>), the event sender (<indexterm><primary>LzIdle</primary></indexterm><classname>LzIdle</classname>) and the event name (<indexterm><primary>onidle event</primary></indexterm><literal>onidle</literal>).</para>
<para>This translates to something like: "Every time the <indexterm><primary>LzIdle</primary></indexterm><classname>LzIdle</classname> service publishes an
<indexterm><primary>onidle event</primary></indexterm><literal>onidle</literal> event, call the <indexterm><primary><literal>adjustSize()</literal></primary></indexterm><methodname>adjustSize()</methodname> method as if it were called from <literal>this</literal>".</para>
@@ -880,7 +930,14 @@
<para>In the snippet of code above, we have defined the <indexterm><primary>mediaWindow</primary></indexterm><classname>mediaWindow</classname> class, then instantiated it. This means that <varname>myInstance</varname> contains a view named myView. When we instantiate <indexterm><primary>mediaWindow</primary></indexterm><classname>mediaWindow</classname>, we can pass it a view, and tell that view where to go. That's exactly what we're doing with <varname>myPlacedView</varname>. <varname>myPlacedView</varname>'s <literal>parent</literal> is the <indexterm><primary>mediaWindow</primary></indexterm><classname>mediaWindow</classname>'s <varname>myView</varname>, whereas its <literal>immediateparent</literal> is <varname>myInstance</varname>.</para>
-<example role="live-example"><title>Completed window</title><programlisting role="lzx-embednew"><filename>window-tutorial-$11.lzx</filename><parameter/><code>
+<example role="live-example">
+ <title>Completed window</title>
+ <programlisting language="lzx">
+ <textobject><textdata fileref="window-tutorial-$11.lzx"/></textobject>
+ </programlisting>
+</example>
+
+<?example role="live-example"><title>Completed window</title><programlisting role="lzx-embednew"><filename>window-tutorial-$11.lzx</filename><parameter/><code>
<canvas width="800" height="400">
<class name="mediaWindow"
x="10" y="10"
@@ -1096,7 +1153,7 @@
</text>
</mediaWindow></emphasis>
</canvas>
-</programlisting><?lzx-edit programs/window-tutorial-$11.lzx?></example>
+</programlisting><?lzx-edit programs/window-tutorial-$11.lzx></example?>
<para>As <varname>firstWindow</varname> clearly shows, it is possible to override the attributes (such as <indexterm><primary>width</primary></indexterm><sgmltag class="attribute">width</sgmltag> and <indexterm><primary>height</primary></indexterm><sgmltag class="attribute">height</sgmltag>, that were specified in the class definition).</para>
Modified: openlaszlo/branches/legals/docs/src/reference/preface.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/reference/preface.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/reference/preface.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -5,7 +5,7 @@
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<preface>
+<preface id="ref.preface">
<title>Preface</title>
<para>The OpenLaszlo Reference describes all of the public XML tags and JavaScript APIs in the LZX language. A companion document, the Contributor's Guide, includes descriptions of all private APIs, and other information of interest to contributors to the OpenLaszlo platform.</para>
@@ -16,7 +16,7 @@
<member><ulink url="../guide/index.html" target="_blank"><citetitle>Developers Guide</citetitle></ulink></member>
<member><ulink url="../../laszlo-explorer/" target="_blank"><citetitle>Laszlo Explorer</citetitle></ulink></member>
<member><ulink url="http://www.openlaszlo.org/community" target="_blank"><citetitle>OpenLaszlo Community</citetitle></ulink></member>
- <member><ulink url="http://forum.laszlosystems.com" target="_blank"><citetitle>Developer Forums</citetitle></ulink></member>
+ <member><ulink url="http://forum.openlaszlo.org" target="_blank"><citetitle>Developer Forums</citetitle></ulink></member>
</simplelist>
</sect1>
Modified: openlaszlo/branches/legals/docs/src/userset.dbk
===================================================================
--- openlaszlo/branches/legals/docs/src/userset.dbk 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/userset.dbk 2007-07-11 20:04:01 UTC (rev 5644)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright =2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!--DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
@@ -16,7 +16,7 @@
<xi:fallback><para>Missing: Deployers Guide</para></xi:fallback>
</xi:include>
- <xi:include href="build/reference/index.dbk">
+ <xi:include href="reference/index.dbk">
<xi:fallback><para>Missing: Reference</para></xi:fallback>
</xi:include>
@@ -26,6 +26,8 @@
<index type="tags"/>
<index type="deprecated"/>
?>
- <index/>
+ <index>
+ <title>General Index</title>
+ </index>
</appendix>
</set>
Deleted: openlaszlo/branches/legals/docs/src/wrappers/lz-radiogroup.html
Modified: openlaszlo/branches/legals/docs/src/xsl/common-html.xsl
===================================================================
--- openlaszlo/branches/legals/docs/src/xsl/common-html.xsl 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/xsl/common-html.xsl 2007-07-11 20:04:01 UTC (rev 5644)
@@ -32,7 +32,7 @@
<!-- Address of the generated files relative to servlet -->
<xsl:param name="localdir"/>
- <!-- OBSOLETE: Relative address of embedded LZX files -->
+ <!-- DEPRECATED: Relative address of embedded LZX files -->
<xsl:param name="lzxdir" select="'programs/'"/>
<!-- class of html body element -->
@@ -154,88 +154,28 @@
</div>
</xsl:template>
- <xsl:template mode="apply-callouts" match="/">
- <xsl:param name="callout.ids"/>
- <xsl:copy>
- <xsl:apply-templates mode="apply-callouts" select="@*|node()">
- <xsl:with-param name="callout.ids" select="$callout.ids"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="xpath-to-id" match="/">
- <xsl:param name="xpath"/>
- <xsl:choose>
- <xsl:when test="function-available('dyn:evaluate')">
- <xsl:value-of select="generate-id(dyn:evaluate($xpath))"/>
- </xsl:when>
- <xsl:when test="function-available('saxon:evaluate')">
- <xsl:value-of select="generate-id(saxon:evaluate($xpath))"/>
- </xsl:when>
- <xsl:otherwise>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="programlistingco[programlisting[@language='lzx']]">
+ <xsl:template match="programlistingco[areaspec/area[@units='other']]">
<!-- short-circuit default programlistingco handling, since docbook-xsl won't
know how to handle our areaspec. -->
<xsl:apply-templates select="programlisting"/>
</xsl:template>
- <xsl:template mode="canvas-width" match="/">
- <xsl:choose>
- <xsl:when test="canvas/@width">
- <xsl:value-of select="canvas/@width"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$warn.no.programlisting.canvas.width">
- <xsl:message>programlisting: defaulting width to 500</xsl:message>
- </xsl:if>
- <xsl:text>500</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="canvas-height" match="/">
- <xsl:choose>
- <xsl:when test="canvas/@height">
- <xsl:value-of select="canvas/@height"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$warn.no.programlisting.canvas.width">
- <xsl:message>programlisting: defaulting height to 400</xsl:message>
- </xsl:if>
- <xsl:text>400</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="programlisting[@language='lzx']">
+ <xsl:template match="programlisting[@language='lzx' and textobject/textdata/@fileref]">
<!-- extract necessary information from context -->
<xsl:variable name="fname" select="textobject/textdata/@fileref"/>
<xsl:variable name="query-parameters" select="parameter[@role='query']"/>
- <xsl:variable name="callout-xpaths" select="ancestor::programlistingco/areaspec/area/@otherunits"/>
+ <xsl:variable name="canvas-parameters" select="parameter[@role='canvas']"/>
- <!-- pull in the (parsed XML) program source -->
- <xsl:variable name="relative.dir">
- <xsl:call-template name="dbhtml-dir"/>
- </xsl:variable>
- <xsl:variable name="programpath" select="concat($base.dir,$relative.dir,$fname)"/>
- <xsl:variable name="programsource" select="document($programpath)"/>
-
<!-- format live example -->
<xsl:variable name="live" select="ancestor::example[@role='live-example'] or ancestor::informalexample[@role='live-example']"/>
<xsl:if test="$live">
- <xsl:variable name="canvas-width"><xsl:apply-templates mode="canvas-width" select="$programsource"/></xsl:variable>
- <xsl:variable name="canvas-height"><xsl:apply-templates mode="canvas-height" select="$programsource"/></xsl:variable>
<div class="embedded-canvas">
<xsl:variable name="query-param">
<xsl:if test="$query-parameters">&<xsl:value-of select="$query-parameters[1]/text()"></xsl:value-of></xsl:if>
</xsl:variable>
<xsl:variable name="canvas-id" select="generate-id(.)"/>
- <xsl:variable name="swf-embed-params">{url: '<xsl:value-of select="concat($fname, '?lzt=swf', $query-param)"/>', id: '<xsl:value-of select="concat($canvas-id,'SWF')"/>', width: '<xsl:copy-of select="$canvas-width"/>', height: '<xsl:copy-of select="$canvas-height"/>'}</xsl:variable>
- <xsl:variable name="dhtml-embed-params">{url: '<xsl:value-of select="concat($fname, '?lzt=html&lzr=dhtml', $query-param)"/>', id: '<xsl:value-of select="concat($canvas-id,'DHTML')"/>', width: '<xsl:copy-of select="$canvas-width"/>', height: '<xsl:copy-of select="$canvas-height"/>'}</xsl:variable>
+ <xsl:variable name="swf-embed-params">{url: '<xsl:value-of select="concat($fname, '?lzt=swf', $query-param)"/>', id: '<xsl:value-of select="concat($canvas-id,'SWF')"/>', <xsl:value-of select="$canvas-parameters"/>}</xsl:variable>
+ <xsl:variable name="dhtml-embed-params">{url: '<xsl:value-of select="concat($fname, '?lzt=html&lzr=dhtml', $query-param)"/>', id: '<xsl:value-of select="concat($canvas-id,'DHTML')"/>', <xsl:value-of select="$canvas-parameters"/>}</xsl:variable>
<!-- To test examples in DHTML, uncomment the second script block below.
If you don't want to see the SWF version as well, comment out the
first script block. -->
@@ -250,24 +190,11 @@
</div>
</xsl:if>
- <!-- format program listing itself -->
- <xsl:variable name="callout.ids">
- <xsl:for-each select="$callout-xpaths">
- <xsl:text> </xsl:text>
- <xsl:apply-templates mode="xpath-to-id" select="$programsource">
- <xsl:with-param name="xpath" select="."/>
- </xsl:apply-templates>
- <xsl:text> </xsl:text>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="prettysource">
- <xsl:call-template name="lzx-pretty-print">
- <xsl:with-param name="source" select="exslt:node-set($programsource)"/>
- <xsl:with-param name="callout.ids" select="exslt:node-set($callout.ids)"/>
- </xsl:call-template>
- </xsl:variable>
- <pre class="programlisting"><xsl:copy-of select="$prettysource"/></pre>
-
+ <!-- the program listing itself can be formatted by dbk-xsl -->
+ <pre class="programlisting">
+ <xsl:apply-templates select="phrase"/>
+ </pre>
+
<!-- throw in the edit button -->
<xsl:if test="$live">
<xsl:variable name="edit-href">
@@ -282,6 +209,12 @@
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>
+
+ <xsl:template match="sgmltag[@role='Copyright']">
+ <div class="lzx-copyright">
+ <xsl:apply-imports/>
+ </div>
+ </xsl:template>
<xsl:template name="get-canvas-attribute">
<xsl:param name="text"/>
Copied: openlaszlo/branches/legals/docs/src/xsl/dbkpreprocessexamples.xsl (from rev 5631, openlaszlo/branches/doctools/docs/src/xsl/dbkpreprocessexamples.xsl)
Modified: openlaszlo/branches/legals/docs/src/xsl/js2doc-comment2dbk.xsl
===================================================================
--- openlaszlo/branches/legals/docs/src/xsl/js2doc-comment2dbk.xsl 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/xsl/js2doc-comment2dbk.xsl 2007-07-11 20:04:01 UTC (rev 5644)
@@ -62,7 +62,7 @@
</title>
</xsl:template>
- <xsl:template match="code|tt">
+ <xsl:template match="code|tt" mode="html2dbk">
<literal>
<xsl:if test="@class">
<xsl:attribute name="role"><xsl:value-of select="@class"/></xsl:attribute>
@@ -255,7 +255,7 @@
</simplelist>
</xsl:template>
- <xsl:template match="pre">
+ <xsl:template match="pre" mode="html2dbk">
<programlisting language="lzx">
<xsl:apply-templates/>
</programlisting>
Modified: openlaszlo/branches/legals/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/branches/legals/docs/src/xsl/js2doc2dbk.xsl 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/xsl/js2doc2dbk.xsl 2007-07-11 20:04:01 UTC (rev 5644)
@@ -354,19 +354,18 @@
<xsl:apply-templates select="." mode="desc"/>
</xsl:variable>
<xsl:variable name="xref">
- <xsl:call-template name="itemdesc">
- <xsl:with-param name="desc" select="$desc"/>
- </xsl:call-template>
+ <xsl:apply-templates select="." mode="xref"/>
</xsl:variable>
<varlistentry>
<term id="{@id}" xreflabel="{$xref}">
+ <!-- how to get the indexterm to use a different name than xreflabel? -->
<indexterm zone="{@id}">
<primary>
<xsl:if test="$name != $sortasname">
<xsl:attribute name="sortas"><xsl:value-of select="$sortasname"/></xsl:attribute>
</xsl:if>
- <xsl:value-of select="$xref"/>
+ <xsl:value-of select="$name"/>
</primary>
</indexterm>
<xsl:value-of select="$desc"/>
@@ -462,6 +461,42 @@
</xsl:choose>
</xsl:template>
+ <!-- CROSS REFERENCE DESCRIPTION -->
+
+ <xsl:template match="property|initarg" mode="commonname">
+ <xsl:variable name="jsname" select="@name"/>
+ <xsl:variable name="lzxname" select="&tagname;"/>
+ <xsl:choose>
+ <xsl:when test="$jsname and not(starts-with($jsname,'lz.'))">
+ <xsl:value-of select="$jsname"/>
+ </xsl:when>
+ <xsl:when test="$lzxname and $lzxname != ''">
+ <xsl:value-of select="$lzxname"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message><xsl:text>property has no name</xsl:text></xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="property[@name='prototype' or @name='__ivars__' or @name='setters']" mode="parentpath">
+ <xsl:apply-templates select="(ancestor::property)[1]" mode="parentpath"/>
+ </xsl:template>
+
+ <xsl:template match="property" mode="parentpath">
+ <xsl:variable name="parent" select="(ancestor::property)[1]"/>
+ <xsl:if test="$parent">
+ <xsl:apply-templates select="$parent" mode="parentpath"/>
+ <xsl:apply-templates select="$parent" mode="commonname"/>
+ <xsl:text>.</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="property|initarg" mode="xref">
+ <xsl:apply-templates select="." mode="parentpath"/>
+ <xsl:apply-templates select="." mode="desc"/>
+ </xsl:template>
+
<!-- REFENTRY HELPERS -->
<xsl:template name="describe-parameters">
@@ -566,75 +601,82 @@
<!-- INDEX -->
- <xsl:template name="declaration-index">
- <xsl:variable name="jsname" select="@name"/>
- <xsl:variable name="lzxname" select="&tagname;"/>
- <xsl:choose>
- <xsl:when test="$jsname and not(starts-with($jsname,'lz.'))">
- <!-- JavaScript name is primary -->
- <xsl:variable name="sortasjs" select="translate($jsname,'_$',' ')"/>
- <indexterm>
+ <xsl:template name="declaration-index-inner">
+ <xsl:param name="name"/>
+ <xsl:param name="altname"/>
+ <xsl:variable name="sortas" select="translate($name,'_$',' ')"/>
+ <indexterm zone="{@id}">
+ <primary>
+ <xsl:if test="$name != $sortas">
+ <xsl:attribute name="sortas"><xsl:value-of select="$sortas"/></xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="$name"/>
+ </primary>
+ <secondary>Described</secondary>
+ <xsl:if test="$altname">
+ <seealso><xsl:value-of select="$altname"/></seealso>
+ </xsl:if>
+ </indexterm>
+ <xsl:if test="$altname">
+ <xsl:variable name="sortasalt" select="translate($altname,'_$',' ')"/>
+ <indexterm zone="{@id}">
+ <xsl:if test="$altname != $sortasalt">
+ <xsl:attribute name="sortas"><xsl:value-of select="$sortasalt"/></xsl:attribute>
+ </xsl:if>
+ <primary><xsl:value-of select="$altname"/></primary>
+ <see><xsl:value-of select="$name"/></see>
+ </indexterm>
+<?ignore
+ <indexterm type="tags">
+ <primary><xsl:value-of select="$lzxname"/></primary>
+ </indexterm>
+?>
+ </xsl:if>
+ <xsl:variable name="parentid" select="@unitid"/>
+ <xsl:if test="$parentid">
+ <xsl:variable name="visibility"><xsl:value-of select="key('id',$parentid)/@access"/></xsl:variable>
+ <xsl:if test="contains($visibility.filter, $visibility)">
+ <indexterm zone="{$parentid}">
<primary>
- <xsl:if test="$jsname != $sortasjs">
- <xsl:attribute name="sortas"><xsl:value-of select="$sortasjs"/></xsl:attribute>
+ <xsl:if test="$name != $sortas">
+ <xsl:attribute name="sortas"><xsl:value-of select="$sortas"/></xsl:attribute>
</xsl:if>
- <xsl:value-of select="$jsname"/>
+ <xsl:value-of select="$name"/>
</primary>
- <secondary>Defined</secondary>
- <xsl:if test="$lzxname">
- <seealso><xsl:value-of select="$lzxname"/></seealso>
- </xsl:if>
+ <secondary>Declared in</secondary>
</indexterm>
- <xsl:if test="$lzxname">
- <xsl:variable name="sortaslzx" select="translate($lzxname,'_$',' ')"/>
- <indexterm>
- <xsl:if test="$lzxname != $sortaslzx">
- <xsl:attribute name="sortas"><xsl:value-of select="$sortaslzx"/></xsl:attribute>
- </xsl:if>
- <primary><xsl:value-of select="$lzxname"/></primary>
- <see><xsl:value-of select="$jsname"/></see>
- </indexterm>
+ </xsl:if>
+ </xsl:if>
<?ignore
- <indexterm type="tags">
- <primary><xsl:value-of select="$lzxname"/></primary>
- </indexterm>
-?>
+ <xsl:if test="contains(@keywords, 'deprecated')">
+ <indexterm type="deprecated">
+ <xsl:if test="$name != $sortas">
+ <xsl:attribute name="sortas"><xsl:value-of select="$sortas"/></xsl:attribute>
</xsl:if>
-<?ignore
- <xsl:if test="contains(@keywords, 'deprecated')">
- <indexterm type="deprecated">
- <xsl:if test="$jsname != $sortasjs">
- <xsl:attribute name="sortas"><xsl:value-of select="$sortasjs"/></xsl:attribute>
- </xsl:if>
- <primary>
- <xsl:value-of select="$jsname"/>
- </primary>
- </indexterm>
- </xsl:if>
+ <primary>
+ <xsl:value-of select="$name"/>
+ </primary>
+ </indexterm>
+ </xsl:if>
?>
+ </xsl:template>
+
+ <xsl:template name="declaration-index">
+ <xsl:variable name="jsname" select="@name"/>
+ <xsl:variable name="lzxname" select="&tagname;"/>
+ <xsl:choose>
+ <xsl:when test="$jsname and not(starts-with($jsname,'lz.'))">
+ <!-- JavaScript name is primary -->
+ <xsl:call-template name="declaration-index-inner">
+ <xsl:with-param name="name" select="$jsname"/>
+ <xsl:with-param name="altname" select="$lzxname"/>
+ </xsl:call-template>
</xsl:when>
<xsl:when test="$lzxname and $lzxname != ''">
<!-- LZX name is primary -->
- <xsl:variable name="sortaslzx" select="translate($lzxname,'_$',' ')"/>
- <indexterm>
- <xsl:if test="$lzxname != $sortaslzx">
- <xsl:attribute name="sortas"><xsl:value-of select="$sortaslzx"/></xsl:attribute>
- </xsl:if>
- <primary><xsl:value-of select="$lzxname"/></primary>
- <secondary>Defined</secondary>
- </indexterm>
-<?ignore
- <xsl:if test="contains(@keywords, 'deprecated')">
- <indexterm type="deprecated">
- <xsl:if test="$lzxname != $sortaslzx">
- <xsl:attribute name="sortas"><xsl:value-of select="$sortaslzx"/></xsl:attribute>
- </xsl:if>
- <primary>
- <xsl:value-of select="$lzxname"/>
- </primary>
- </indexterm>
- </xsl:if>
-?>
+ <xsl:call-template name="declaration-index-inner">
+ <xsl:with-param name="name" select="$lzxname"/>
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:message><xsl:text>couldn't generate index for item with no name</xsl:text></xsl:message>
@@ -656,7 +698,7 @@
</xsl:if>
<xsl:variable name="decltype"><xsl:apply-templates select="." mode="type"/></xsl:variable>
- <xsl:if test="$decltype">
+ <xsl:if test="$decltype and $decltype != ''">
<varlistentry><term>Type: <xsl:value-of select="$decltype"/></term></varlistentry>
</xsl:if>
@@ -678,20 +720,28 @@
<varlistentry><term>Build Flags: <xsl:value-of select="@includebuilds"/></term></varlistentry>
</xsl:if>
- <xsl:variable name="topic" select="@topic"/>
- <xsl:variable name="subtopic" select="@subtopic"/>
- <xsl:if test="$topic">
- <varlistentry><term>Topic: <xref linkend="{translate(concat('topic.',$topic,'.',$subtopic),' ','_')}"/></term></varlistentry>
- </xsl:if>
+ <xsl:variable name="topic" select="@topic"/>
+ <xsl:variable name="subtopic" select="@subtopic"/>
+ <xsl:if test="$topic">
+ <varlistentry><term>Topic: <xref linkend="{translate(concat('topic.',$topic,'.',$subtopic),' ','_')}"/></term></varlistentry>
+ </xsl:if>
- <xsl:variable name="parentid" select="@unitid"/>
- <xsl:if test="$parentid">
- <xsl:variable name="visibility"><xsl:value-of select="key('id',$parentid)/@access"/></xsl:variable>
- <xsl:if test="contains($visibility.filter, $visibility)">
- <varlistentry><term>Declared in: <xref linkend="{$parentid}"/></term></varlistentry>
+ <xsl:variable name="parentid" select="@unitid"/>
+ <xsl:if test="$parentid">
+ <xsl:variable name="visibility"><xsl:value-of select="key('id',$parentid)/@access"/></xsl:variable>
+ <xsl:if test="contains($visibility.filter, $visibility)">
+ <varlistentry><term>Declared in: <xref linkend="{$parentid}"/></term></varlistentry>
+ </xsl:if>
</xsl:if>
- </xsl:if>
+<?ignore
+ <!-- need to turn path into webapp url, not sure how to do that -->
+ <xsl:variable name="path" select="@path"/>
+ <xsl:if test="$path and $path != ''">
+ <xsl:variable name="pathurl" select="$pathurl"/>
+ <varlistentry><term>Source: <ulink url="{$pathurl}"/></term></varlistentry>
+ </xsl:if>
+?>
</variablelist>
</xsl:template>
Modified: openlaszlo/branches/legals/docs/src/xsl/lzx-pretty-print.xsl
===================================================================
--- openlaszlo/branches/legals/docs/src/xsl/lzx-pretty-print.xsl 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/xsl/lzx-pretty-print.xsl 2007-07-11 20:04:01 UTC (rev 5644)
@@ -17,6 +17,10 @@
exclude-result-prefixes="dbk"
version="1.0">
+<!-- convert to use docbook markup, as in http://infohost.nmt.edu/tcc/help/pubs/docbook/inline-section.html
+ or http://ecolore.leeds.ac.uk/xml/about/db_usage.xml?lang=en
+ (see wrt to sgmltag) -->
+
<xsl:param name="lzxpp-base"/>
<xsl:param name="lzxpp-url"/>
@@ -29,100 +33,75 @@
</xsl:apply-templates>
</xsl:template>
- <!-- lzxpp-co lets us insert <span class="em"></span> blocks whereever we are told
- a callout should appear. This should work for elements, attributes, comments, and text. -->
- <xsl:template mode="lzxpp-co" match="/">
- <xsl:param name="callout.ids"/>
- <xsl:apply-templates mode="lzxpp" select=".">
- <xsl:with-param name="callout.ids" select="$callout.ids"/>
- </xsl:apply-templates>
- </xsl:template>
-
- <xsl:template mode="lzxpp-co" match="@*|node()">
- <xsl:param name="callout.ids"/>
- <xsl:variable name="ctx.id" select="generate-id(.)"/>
- <xsl:choose>
- <xsl:when test="contains($callout.ids, concat(' ', $ctx.id, ' '))">
- <span class="lzxpp-co">
- <xsl:apply-templates mode="lzxpp" select=".">
- <xsl:with-param name="callout.ids" select="$callout.ids"/>
- </xsl:apply-templates>
- </span>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="lzxpp" select=".">
- <xsl:with-param name="callout.ids" select="$callout.ids"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
+ <!-- lzxpp-co lets us insert <span class="em"></span> blocks whereever we are told
+ a callout should appear. This should work for elements, attributes, comments, and text (but not substrings). -->
+ <xsl:template mode="lzxpp-co" match="/">
+ <xsl:param name="callout.ids"/>
+ <xsl:apply-templates mode="lzxpp-co">
+ <xsl:with-param name="callout.ids" select="$callout.ids"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template mode="lzxpp-co" match="@*|node()">
+ <xsl:param name="callout.ids"/>
+ <xsl:variable name="ctx.id" select="generate-id(.)"/>
+ <xsl:choose>
+ <xsl:when test="contains($callout.ids, concat(' ', $ctx.id, ' '))">
+ <emphasis>
+ <xsl:apply-templates mode="lzxpp" select=".">
+ <xsl:with-param name="callout.ids" select="$callout.ids"/>
+ </xsl:apply-templates>
+ </emphasis>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="lzxpp" select=".">
+ <xsl:with-param name="callout.ids" select="$callout.ids"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
<!-- lzxpp does the actual work of pretty-printing the source -->
- <xsl:template mode="lzxpp" match="/">
- <xsl:param name="callout.ids"/>
- <xsl:apply-templates mode="lzxpp-co">
- <xsl:with-param name="callout.ids" select="$callout.ids"/>
- </xsl:apply-templates>
- </xsl:template>
-
<xsl:template mode="lzxpp" match="*">
<xsl:param name="callout.ids"/>
- <span class="element">
- <span class="markup"><xsl:text><</xsl:text></span>
- <span class="starttag">
+ <markup><</markup>
+ <sgmltag class="element">
<xsl:attribute name="id"><xsl:value-of select="generate-id()"/></xsl:attribute>
<xsl:value-of select="name()"/>
- </span>
+ </sgmltag>
<xsl:for-each select="@*">
<xsl:text> </xsl:text>
- <span>
- <xsl:apply-templates mode="lzxpp-co" select=".">
- <xsl:with-param name="callout.ids" select="$callout.ids"/>
- </xsl:apply-templates>
- </span>
+ <xsl:apply-templates mode="lzxpp-co" select=".">
+ <xsl:with-param name="callout.ids" select="$callout.ids"/>
+ </xsl:apply-templates>
</xsl:for-each>
<xsl:choose>
<xsl:when test="node()">
- <span class="markup"><xsl:text>></xsl:text></span>
+ <markup>></markup>
<xsl:apply-templates mode="lzxpp-co">
<xsl:with-param name="callout.ids" select="$callout.ids"/>
</xsl:apply-templates>
- <span class="markup"><xsl:text></</xsl:text></span>
- <span class="endtag"><xsl:value-of select="name()"/></span>
- <span class="markup"><xsl:text>></xsl:text></span>
+ <markup></</markup>
+ <sgmltag class="element"><xsl:value-of select="name()"/></sgmltag>
+ <markup>></markup>
</xsl:when>
- <xsl:otherwise><span class="markup">/></span></xsl:otherwise>
+ <xsl:otherwise><markup>/></markup></xsl:otherwise>
</xsl:choose>
- </span>
</xsl:template>
<xsl:template mode="lzxpp" match="comment()">
- <xsl:param name="callout.ids"/>
- <span>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="contains(., 'Copyright')">
- <xsl:text>comment lzx-copyright</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>comment</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
-
- <xsl:if test="not(ancestor::*)">
- <xsl:text> </xsl:text>
+ <xsl:if test="not(ancestor::*)">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <sgmltag class="sgmlcomment">
+ <xsl:if test="contains(., 'Copyright')">
+ <xsl:attribute name="role">Copyright</xsl:attribute>
</xsl:if>
-
- <span class="comment-markup"><xsl:text><!--</xsl:text></span>
- <span class="comment-body"><xsl:value-of select="."/></span>
- <span class="comment-markup"><xsl:text>--></xsl:text></span>
-
- <xsl:if test="not(ancestor::*) and following-sibling::*[1]=following-sibling::node()[1]">
- <xsl:text> </xsl:text>
- </xsl:if>
-
- </span>
+ <xsl:value-of select="."/>
+ </sgmltag>
+ <xsl:if test="not(ancestor::*) and following-sibling::*[1]=following-sibling::node()[1]">
+ <xsl:text> </xsl:text>
+ </xsl:if>
</xsl:template>
<xsl:template mode="lzxpp" match="text()[normalize-space(.)='']">
@@ -130,28 +109,30 @@
</xsl:template>
<xsl:template mode="lzxpp" match="text()">
- <xsl:param name="callout.ids"/>
<xsl:param name="quote" select="contains(., '<') or contains(., '>') or contains(., '&')"/>
<code>
<xsl:if test="$quote">
- <span class="markup"><xsl:text><![CDATA[</xsl:text></span>
+ <markup><![CDATA[</markup>
</xsl:if>
- <xsl:value-of select="."/>
+ <xsl:value-of select="."/> <!-- this is losing the semi-colons. xsl:copy and xsl:copy-of do the same thing. And disable-output-escaping="yes" doesn't help either. -->
<xsl:if test="$quote">
- <span class="markup"><xsl:text>]</xsl:text><xsl:text>]></xsl:text></span>
+ <markup><xsl:text>]</xsl:text><xsl:text>]></xsl:text></markup>
</xsl:if>
</code>
</xsl:template>
<xsl:template mode="lzxpp" match="@*">
- <xsl:param name="callout.ids"/>
- <span class="attrname"><xsl:value-of select="name()"/></span>
+ <sgmltag class="attribute"><xsl:value-of select="name()"/></sgmltag>
<xsl:text>="</xsl:text>
- <span class="attrvalue">
- <xsl:apply-templates mode="lzxpp-attribute-value" select="."/>
- </span>
+ <xsl:apply-templates mode="lzxpp-attribute-value" select="."/>
<xsl:text>"</xsl:text>
</xsl:template>
+
+ <xsl:template mode="lzxpp" match="processing-instruction('lzx-co')">
+ <co>
+ <xsl:attribute name="id"><xsl:value-of select="normalize-space(.)"/></xsl:attribute>
+ </co>
+ </xsl:template>
<!--
Special display for attribute values
@@ -162,9 +143,12 @@
spaces in place. This is part of the XML 1.0 spec
(http://www.w3.org/TR/REC-xml/#AVNormalize) and cannot be turned off,
so the best thing to do is to strip out the extra spaces. -->
- <xsl:value-of select="normalize-space(.)"/>
+ <sgmltag class="attvalue">
+ <xsl:value-of select="normalize-space(.)"/>
+ </sgmltag>
</xsl:template>
+<?ignore
<xsl:template mode="lzxpp-attribute-value" match="@*[&constraint;]" >
<span class="constraint-markup">
<xsl:value-of select="substring-before(., '{')"/>
@@ -177,14 +161,10 @@
<span class="constraint-markup">}</span>
</xsl:template>
- <xsl:template mode="lzxpp-attribute-value" match="@id">
+ <xsl:template mode="lzxpp-attribute-value" match="@id|@name">
<span class="name"><xsl:value-of select="."/></span>
</xsl:template>
- <xsl:template mode="lzxpp-attribute-value" match="@name">
- <span class="name"><xsl:value-of select="."/></span>
- </xsl:template>
-
<xsl:template mode="lzxpp-attribute-value" match="include/@href">
<a href="{$lzxpp-url}{.}"><xsl:value-of select="."/></a>
</xsl:template>
@@ -197,6 +177,7 @@
<xsl:template mode="lzxpp-attribute-value" match="attribute/@value[not(&constraint;)]">
<code><xsl:value-of select="."/></code>
</xsl:template>
+?>
</xsl:stylesheet>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
Modified: openlaszlo/branches/legals/docs/src/xsl/parameters.xsl
===================================================================
--- openlaszlo/branches/legals/docs/src/xsl/parameters.xsl 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/docs/src/xsl/parameters.xsl 2007-07-11 20:04:01 UTC (rev 5644)
@@ -52,6 +52,7 @@
<xsl:param name="generate.toc">
appendix toc,title
+ appendix/index toc,title
article/appendix nop
article toc,title
book toc,title
Modified: openlaszlo/branches/legals/lps/components/base/basedatepicker.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/base/basedatepicker.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/base/basedatepicker.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -601,7 +601,7 @@
basedatepickerday and basedatepickerweek will be overridden to provide full
functionality of a datepicker. For datepicker, these methods include
doSpaceUp(), doEnterUp(), and optionally setMonthToShow(). See the source code of
- datepicker for a more extensive example. See also <xref linkend="basedatepickerday"/> and <xref linkend="basedatepickerweek"/>
+ datepicker for a more extensive example. See also <xref linkend="lz.basedatepickerday"/> and <xref linkend="lz.basedatepickerweek"/>
</p>
<example class="program" id="basedatepicker-1">
Modified: openlaszlo/branches/legals/lps/components/base/basedatepickerday.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/base/basedatepickerday.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/base/basedatepickerday.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -62,7 +62,7 @@
functionality of a datepicker. For basedatepickerday, these methods include
buttonpush(), buttonrelease(), gotFocus(), and removeFocus(). See the source code of
datepicker for a more extensive example.
- See also <xref linkend="basedatepicker"/> and <xref linkend="basedatepickerweek"/>
+ See also <xref linkend="lz.basedatepicker"/> and <xref linkend="lz.basedatepickerweek"/>
</p>
</text>
Modified: openlaszlo/branches/legals/lps/components/base/basedatepickerweek.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/base/basedatepickerweek.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/base/basedatepickerweek.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -194,8 +194,8 @@
<text>
<p>
Basedatepickerweek is an abstract class representing a week for use with the
- basedatepicker. See also <xref linkend="basedatepicker"/>
- and <xref linkend="basedatepickerday"/>
+ basedatepicker. See also <xref linkend="lz.basedatepicker"/>
+ and <xref linkend="lz.basedatepickerday"/>
</p>
</text>
Modified: openlaszlo/branches/legals/lps/components/base/basescrollbar.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/base/basescrollbar.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/base/basescrollbar.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -550,7 +550,7 @@
mouse button is released.
</p>
- <p> See <xref linkend="basescrollbar"/> for more details. </p>
+ <p> See <xref linkend="lz.basescrollbar"/> for more details. </p>
</text>
</doc>
</class>
@@ -578,7 +578,7 @@
<text>
<p>
This class must be used with basescrollbar.
- See <xref linkend="basescrollbar"/> for more details.
+ See <xref linkend="lz.basescrollbar"/> for more details.
</p>
</text>
</doc>
Modified: openlaszlo/branches/legals/lps/components/base/image.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/base/image.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/base/image.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -5,7 +5,8 @@
<attribute name="prefix" value="" type="string"/>
<!--- The URL to load the image from. May be set directly on this attribute or indirectly by specifying a datapath for this tag. -->
<attribute name="src" value="" type="string"/>
- <!--- The last URL loaded by this image tag. Used to prevent the same URL from loading twice. @keywords readonly-->
+ <!--- The last URL loaded by this image tag. Used to prevent the same URL from loading twice.
+ @keywords readonly-->
<attribute name="lastloaded" value="" type="string"/>
<!--- If true, the same URL will be reloaded. If false, the same URL will not load multiple times. -->
<attribute name="forcereload" value="false" type="boolean"/>
@@ -16,8 +17,13 @@
this.setAttribute('src', d);
</method>
- <!--- Loads an image in response to the src attribute being set. Should not be called directly - setAttribute('src' ...) shoudl be used instead. @keywords private -->
- <method name="loadNow" event="onsrc" args="img">
+ <event name="onsrc" />
+
+ <handler name="onsrc" method="loadNow" />
+
+ <!--- Loads an image in response to the src attribute being set. Should not be called directly - setAttribute('src' ...) should be used instead.
+ @keywords private -->
+ <method name="loadNow" args="img">
<![CDATA[
// don't reload the same thing unless we're told to
if (this.forcereload == false && this.lastloaded == this.prefix + img) return;
@@ -26,13 +32,15 @@
]]>
</method>
- <!--- Loads the image on init. @keywords private -->
+ <!--- Loads the image on init.
+ @keywords private -->
<handler name="oninit">
<![CDATA[
if (this.src != '' && this.src != null)
this.loadNow(this.src);
]]>
</handler>
+
<doc>
<tag name="shortdesc"><text>A way to import images</text></tag>
<text>
Modified: openlaszlo/branches/legals/lps/components/charts/common/viewspoolmanager.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/charts/common/viewspoolmanager.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/charts/common/viewspoolmanager.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -118,35 +118,35 @@
</method>
</class>
- <!--- @keyword private
- a pool of ordered view
- -->
+ <!--- A pool of ordered view
+ - @keyword private
+ -->
<class name="viewslist" extends="node">
- <attribute name="list" value="$once{[]}"/>
+ <attribute name="vlist" value="$once{[]}"/>
<attribute name="parentview" value="${parent}"/>
<attribute name="viewclass" type="string" value="$once{null}"/>
<!-- get a view the pool -->
<method name="getViewAt" args="index, args">
- if(this.list[index] == null)
+ if(this.vlist[index] == null)
{
- this.list[index] = new global[viewclass](parentview, args);
+ this.vlist[index] = new global[viewclass](parentview, args);
}
else
{
- this.list[index].setVisible(true);
+ this.vlist[index].setVisible(true);
}
- return this.list[index];
+ return this.vlist[index];
</method>
<!-- put are the view back to the pools -->
<method name="reclaimAll">
<![CDATA[
- for(var i = 0; i < list.length; i++)
+ for(var i = 0; i < vlist.length; i++)
{
- if(list[i] != undefined){
- list[i].setVisible(false);
- //list[i].clear();
+ if(vlist[i] != undefined){
+ vlist[i].setVisible(false);
+ //vlist[i].clear();
}
}
]]>
@@ -155,7 +155,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN
***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved.
+* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
* X_LZ_COPYRIGHT_END
****************************************************** -->
Modified: openlaszlo/branches/legals/lps/components/incubator/draglib.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/incubator/draglib.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/incubator/draglib.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -4,7 +4,7 @@
<library>
<!--- This should be declared as a child of the thing for which you want to
enable dragging. You will need to define a view (an instance of a
- subclass of <xref linkend="basedragimage"/>)
+ subclass of <xref linkend="lz.basedragimage"/>)
to define the visual look of the thing while its being dragged.
<example executable="false">
<class name="dragger" >
@@ -90,7 +90,7 @@
<!--- the visual representation of an object being dragged.
- See <xref linkend="checkdragstate"/> for usage details
+ See <xref linkend="lz.checkdragstate"/> for usage details
@access public
-->
<class name="basedragimage" options="ignorelayout"
Modified: openlaszlo/branches/legals/lps/components/incubator/rich-text/formatbtn.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/incubator/rich-text/formatbtn.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/incubator/rich-text/formatbtn.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -8,7 +8,7 @@
<include href="../stylishbutton.lzx" />
<include href="../tooltip/tooltip.lzx" />
- <!--- class for use of <xref linkend="richtexttoolbar" /> buttons -->
+ <!--- class for use of <xref linkend="lz.richtexttoolbar" /> buttons -->
<class name="formatbtn" extends="stylishbutton" width="26"
focusable="false" style="formatbtn_style">
<!--- the format type that the button will control -->
Modified: openlaszlo/branches/legals/lps/components/lz/radio.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/lz/radio.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/lz/radio.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -15,7 +15,6 @@
<frame src="resources/radio/radiobtn_dsbl_dn.swf" />
</resource>
- <!--- Enables a one-of-many selection of its children. -->
<class name="radiogroup" extends="baselist"
itemclassname="radiobutton" defaultselection="0">
@@ -53,6 +52,64 @@
if( this.onvalue ) this.onvalue.sendEvent( val );
</method>
+ <doc>
+ <tag name="shortdesc"><text>Enables a one-of-many selection of its children.</text></tag>
+ <text>
+ <p>The <tagname>radiogroup</tagname> component encloses a list of
+ <tagname link="true">radiobutton</tagname>s. It ensures that a single
+ item is selected at a time. Initially it will select the first item in
+ a group if none is set to be selected. By default the radio buttons
+ are spaced vertically.</p>
+
+ <p>
+ In the following example, the second radio button is selected. The text
+ that appears is separate from the value that is represented by each item.
+ In this example, <tt>group1.value</tt> is 2.
+ </p>
+
+ <example>
+ <canvas width="200" height="100">
+ <radiogroup id="group1">
+ <radiobutton value="1" text="one"/>
+ <radiobutton value="2" text="two" selected="true"/>
+ <radiobutton value="3" text="three"/>
+ </radiogroup>
+ </canvas>
+ </example>
+
+ <p>
+ You can use radio group with your own layout attribute, by overriding the
+ <tagname>view</tagname> layout attribute. The example below uses a wrapping layout
+ to create two columns of radio buttons. Note that a height must be given to
+ indicate to the layout where to wrap.
+ </p>
+
+ <example>
+ <canvas width="200" height="100">
+ <radiogroup height="60" layout="class:wrappinglayout; axis:y">
+ <radiobutton value="1" text="one"/>
+ <radiobutton value="2" text="two"/>
+ <radiobutton value="3" text="three"/>
+ <radiobutton value="4" text="four"/>
+ <radiobutton value="5" text="five"/>
+ <radiobutton value="6" text="six"/>
+ </radiogroup>
+ </canvas>
+ </example>
+
+ <p>
+ A <tt>radiogroup</tt> can contain a set of any <tagname>baselistitem</tagname>.
+ To make radio buttons with
+ a different look and feel, create a subclass of <tagname>baselistitem</tagname> to use instead
+ of the <tagname>radiobutton</tagname> class.
+ </p>
+
+ <seealso>
+ <tags>radiobutton baselistitem</tags>
+ <component-design id="radio" title="Radio Button"/>
+ </seealso>
+ </text>
+ </doc>
</class>
<!--- Implements a "radio" button, allows a one-of-many selection when
Modified: openlaszlo/branches/legals/lps/components/lzunit/lzunit.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/lzunit/lzunit.lzx 2007-07-11 06:43:31 UTC (rev 5643)
+++ openlaszlo/branches/legals/lps/components/lzunit/lzunit.lzx 2007-07-11 20:04:01 UTC (rev 5644)
@@ -235,7 +235,7 @@
It accumulates the results of the test and defines the various
assert methods that can be used to implement each test.
- <xref linkend="TestCase"/> and <xref linkend="TestResult"/> extend this class to provide
+ <xref linkend="lz.TestCase"/> and <xref linkend="lz.TestResult"/> extend this class to provide
functionality.
@param semantics: one of "javascript" or "actionscript", defaults to
@@ -567,7 +567,7 @@
<!---
TestCase implements an individual test case.
- See the documentation for <xref linkend="TestSuite"/>
+ See the documentation for <xref linkend="lz.TestSuite"/>
for an example of this tag.
@param testName: the name of the test
@@ -764,7 +764,7 @@
its first child view so the results of the test suite will be
displayed.
- See the documentation for <xref linkend="TestSuite"/>
+ See the documentation for <xref linkend="lz.TestSuite"/>
for an example of this tag.
-->
<class name="TestResult" extends="DebugObject" opacity="0.9" bgcolor="0xCCCCCC">
More information about the Laszlo-checkins
mailing list