|
|
|
[
Permlink
| « Hide
]
Elliot Winard - 18/Dec/07 08:32 AM
+ simple example
You'll need to use the new splash technique - the good news is, it works across runtimes and the splash can contain arbitrary html:
<div id="lzsplash" style="z-index: 10000000; top: 0; left: 0; width: 100%; height: 100%; position: fixed; display: table"><p style="display: table-cell; vertical-align: middle;"><img src="/trunk/lps/includes/spinner.gif" style="display: block; margin: 20% auto"></p></div><script type="text/javascript"> Lz.dhtmlEmbed({url: 'copy-of-hello.lzx?lzt=object&lzr=dhtml', bgcolor: '#ffffff', width: '100%', height: '100%', id: 'lzapp'}); Lz.lzapp.onload = function loaded() { var s = document.getElementById('lzsplash'); if (s) LzSprite.prototype.__discardElement(s); } </script> The bad news is, DHTML doesn't have a way to tell you how much of the app has loaded... I don't understand. Are we no longer "write once, run anywhere"?
Suggestion is to conditionalize based on target runtime -
<library> <switch> <when runtime="dhtml"> <!-- no debug window in DHTML, it is in its own iframe --> </when> <otherwise> <include href="debugger.lzx"/> </otherwise> </switch> </library> this must be documented if decision is to drop support of <splash> tag in DHTML
This should be documented. We decided to replace the existing <splash/> tag with a new mechanism - see anny app with lzr=dhtml&lzt=html for an example- essentially, an event is now sent when the app finishes loading, and arbitrary javascript can execute. For lzr=dhtml&lzt=html, we hide a div that contains the progress animation. The <splash/> tag will continue to work in swf as-is.
------------------------------------------------------------------------
r7941 | dda | 2008-01-31 18:25:39 -0500 (Thu, 31 Jan 2008) | 37 lines Changed paths: M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as M /openlaszlo/trunk/docs/src/reference/langref.xml M /openlaszlo/trunk/docs/src/reference/wrappers.xml Change 20080131-dda-2 by dda@lester.local on 2008-01-31 12:16:43 EST in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc for http://svn.openlaszlo.org/openlaszlo/trunk Summary: doc: update recommendations on splash page; fix some examples, fix doc build problem. New Features: Bugs Fixed: Technical Reviewer: (pending) QA Reviewer: (pending) Doc Reviewer: liorio (pending) Documentation: Release Notes: Details: Some miscellany doc issues: Update the <splash> page to include the advice given by Max. LzSprite: fixed an errant javadoc comment that keeps doc from building! LzSprite is not public but its javadoc is still parsed. So this does not effect doc output. Added multiline=true to <p> example. Fixed typo in <p>. <frame>, <event>, <handler>, <method> fixed non-live examples, which were not shown before. Tests: ------------------------------------------------------------------------ |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||