I've filed LPP-9254 for this bug
On 7/30/2010 3:01 PM, André Bargull wrote:
There are at least two issues in embed.js
- first issue in lz.embed.swf():
var appenddiv = embed._getAppendDiv(properties.id,
properties.appenddivid);
getAppendDiv() uses the last <script> element to determine where it
was called from:
// insert after the first script tag found...
var scripts = document.getElementsByTagName('script');
var lastscript = scripts[scripts.length-1];
if (! lastscript) {
document.body.appendChild(root);
} else {
lastscript.parentNode.insertBefore(root,
lastscript.nextSibling );
}
This doesn't work anymore properly, because lz.embed.swf() calls are
enqueued until flash.js is loaded. But when flash.js is loaded, the
trick to use the last <script> element to get the attach-div position
won't succeed. (Also note the great "after the first script tag"
comment, at least the variable has been renamed ;-) )
- second issue in lz.embed.loadJSLib():
// If we're already loading, return early
if (embed.jsloaded[url] === null) return;
embed.jsloaded[url] = false;
Good idea to prevent duplicate loading, but doesn't really work when
"embed.jsloaded[url]" is never set to null. (Simply settting
"embed.jsloaded[url]" to null instead of false won't work because of
the callback function).
I can work on both issues unless someone else wants to take a look.
I'm betting some of the reorganization Max has been doing to the embedding code
is affecting the display of the doc examples. Safari's activity window shows
the example code being loaded, but the div that it is sitting in somehow has 0
size.
On 2010-07-30, at 07:11, Lou Iorio wrote:
>/ None of the examples are showing up in the dguide with a build I did this
/>/ morning, and also
/>/ on the openlaszlo site.
/>/
/>/ For example,
/>/
http://labs.openlaszlo.org/trunk-nightly/docs/developers/tutorials/views-tutorial.html
/>/
/>/ In the first example the code box shows up, but the example itself does
not.
/>/ This should show a
/>/ simple window with some text and a button.
/>/
/>/ Version 4.8.0 works as expected.
/>/
/>/ Lou
/