[Laszlo-dev] How did this code ever work?
Henry Minsky
henry.minsky at gmail.com
Mon Jan 15 19:51:20 PST 2007
In the SOAP runtime library, there's a file included named
lps/components/rpc/library/qname.js
I was getting various errors running it in Legals, and I noticed that it
defines some properties on the global
QName before it is defined to have any value.
QName.SUPPORTED_TYPES = {};
//-----------------------------------------------------------------------------
// String representation of this QName.
//-----------------------------------------------------------------------------
QName.prototype.toString = function () {
return "QName {" + this.__LZns + "}" + this.__LZlocal;
}
//=============================================================================
// DEFINE OBJECT: QName
//
// Create a qualified name object.
//
// @param local: local part of the QName.
// @param namespaceURI: namespace URI for the QName.
//==============================================================================
function QName(local, namespaceURI)
{
this.__LZlocal = local;
this.__LZns = namespaceURI;
QName.SUPPORTED_TYPES[this.toString()] = true;
}
I moved the "function QName (...) {}" block to be the first thing in the
file and it works properly.
How come this is working in trunk? It seems like QName is not defined
anyplace else. One other thing
I changed is that this code now uses the 'when="immediate"' option to
<script> tags that we just added.
But I don't see how that would make a difference.
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20070115/5bb50b01/attachment.html
More information about the Laszlo-dev
mailing list