Sorry, I sent the old code, here's the new code
<script>
<![CDATA[
LzLoader.prototype.returnData = function ( loadobj , data ){
// Check if returnData has already been called on this
// object. This can happen if a serverless data load timed out in
// the LFC, but eventually returned something via the
// LoadVars.sendAndLoad() callback.
if (loadobj.loaded) {
if ($debug) {
Debug.warn("%w.returnData: %w already loaded",
this, loadobj);
}
return;
}
if (loadobj instanceof MovieClip) {
// Nothing to do
} else if (loadobj instanceof XMLNode) {
// Do a fixup to add one extra level of data node to the data,
// to be compatible with what the DataCompiler produces.
var ndata = new LzDataElement('resultset');
// The raw XML response string was stashed here by LzLoadQueue.serverlessOnDataHandler
// TODO [2005-08-11 ptw] Is there not an issue that there
// could be multiple requests?
if (this['rawtext']) {
ndata.rawtext = this.rawtext;
}
if (typeof(data) != 'undefined') {
if (loadobj.proxied) {
// proxied req gets back <resultset><body>XML</body><headers/></resultset>
ndata.setChildNodes(
data.childNodes[0].childNodes);
} else {
// SOLO, we get back raw XML only
ndata.setChildNodes([data]);
}
}
data = ""> } else {
if ($debug) {
Debug.error("%w.returnData: unhandled loadobj %w", this, loadobj);
}
}
// Ok, we have loaded this. loadFinished changes state of loadobj
// from loading to loaded.
// TODO [2005-08-11 ptw] If this were a multi-threaded system, we
// would have to worry about getLoadMovie trying to reuse the
// loadobj before we have finished with it.
// [2005-08-25 ptw] So, we don't want to mark the clip as loaded
// if this is a persistent connection? Not sure what that means.
if ( ! this.doPersist ) _root.LzLoadQueue.loadFinished( loadobj );
// [2005-08-25 ptw] Is this correct? Do we really want an aborted
// request to signal that it timed out?
if ( ! loadobj.valid ) {
this.doTimeOut(loadobj);
return;
}
this.lastloadtime = getTimer() - loadobj.loadtime;
var err;
if ( data.childNodes[0].nodeName == "error") {
err = data.childNodes[0].attributes.msg;
} else if (data.nodeName == "error") {
err = data.attributes.msg;
} else if (data == "medialoaderror") {
err="Media load error";
}
if ( err != null ){
Debug.error( err );
this.onerror.sendEvent( data );
return;
}
if ( this.queuing ){
loadobj.data = "">
while ( this.expectedList.length &&
this.expectedList[ 0 ].loaded ){
var tlmc = this.expectedList.shift();
if ( tlmc.timedout ){
this.doTimeOut(tlmc);
} else if( tlmc.data ){
this.ondata.sendEvent( tlmc.data );
tlmc.data = ""> }
}
} else {
if ( loadobj.timedout ){
this.doTimeOut(loadobj);
} else if( data ){
this.ondata.sendEvent( data );
}
}
}
]]>
</script>
_______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
