On 2008-04-17, at 23:15 EDT, Philip Romanik wrote:
Hi Tucker,
I need some advice on how to handle some deviations from the API.
LzNode.childOf(node)
I need a second argument because childOf() is also a documented API
call for LzDataNode. When I originally did the swf9 port I renamed
LzDataNode.childOf() to be childOfNode(). However, childOf() is the
documented API call. To fix, I added a definition of childOf() in
LzMiniNode and added a second argument. The API deviation is that
LzNode.childOf now takes a second argument that is ignored.
Is there any way we can merge the semantics? I am not averse to
cleaning up these API's. Perhaps grepping around or asking on the
user list if people depend on the distinction between 'general' and
'proper' subnode. It seems like a bug that datanode is a node yet has
a different semantics for a common operation.
LzParam.parseQueryString()
I made this a static method, but the API documents this as a
regular method. Should I change this? swf9 doesn't allow calling a
static using this.
Again, lets just clean this up. Couldn't we put a deprecated version
in the instance for a release?
function parseQueryString (...) {
if ($debug) {
Debug.info("%w.%s is deprecated. Use %w.%s instead",
this, arguments.callee, LzParam,
LzParam.parseQueryString);
}
LzParam.parseQueryString.apply(LzParam, arguments);
}
lztest-lzparams.lzx has lines that look like this:
lp = new LzParam();
This works in dhtml/swf but generates an error in swf9. This needs
to be
var lp = new LzParam();
Won't this be a big headache for some users?
Only for users who should already getting a warning like:
[java] Warning: Assignment to free variable
DojoExternalInterface in LaszloLibrary.lzs (61)
We could turn those warnings on for all applications.