PDA

View Full Version : 4.06, DHTML, "lock is not a fuction error"


ep1
10-30-2007, 12:57 PM
I'm new to DHTML in OL...getting the following error. Any ideas on why is appreciated.

DEBUG: Source warnings enabledWARNING: testing:0: Test source warning
ERROR @http://localhost:9000/lps-4.0.6/lps/includes/lfc/LFCdhtml-debug.js#15452: $2_layouts[$3_i].lock is not a function
lzx> Debug.inspect(«#LzError#1| ERROR @http://localhost:9000...»)
«#LzError#1#0| ERROR @http://localhost:9000/lps-4.0.6/lps/includes/lfc/LFCdhtml-debug.js#15452: $2_layouts[$3_i].lock is not a function» {
file: 'http://localhost:9000/lps-4.0.6/lps/includes/lfc/LFCdhtml-debug.js'
line: 15452
message: '$2_layouts[$3_i].lock is not a function'
}
ERROR @http://localhost:9000/lps-4.0.6/lps/includes/lfc/LFCdhtml-debug.js#15452: $2_layouts[$3_i].lock is not a function
lzx>

senshi
10-30-2007, 02:56 PM
Do you have got a (small) reproducible testcase? Without such a testcase, it's very unlikely that someone can help you!

ep1
11-01-2007, 11:08 AM
Thanks for your response. Unfortunately I don't have a small test case as this is part of a larger app that is working fine under flash.

I get the error only as a dhtml client. Without a way to step through the code in a debugger, it looks like I would have to rewrite the app from scratch until I get to the point that its failing--not an approach I have time for.

senshi
11-01-2007, 11:41 AM
Hmm, without a testcase it might be a bit more difficult to track down this issue, but let's try it!
At least we know that your problem has to do with replication, because the exception is thrown from "LzReplicationManager#__LZHandleMultiNodes(..)".

So, if you add this code to your app, we might figure out what's happening.
If you now get a warning in the debugger, you should be able to find out what element is causing the reported issue.

<script when="immediate" ><![CDATA[
LzReplicationManager.addProperty("__LZHandleMultiNodes_old", LzReplicationManager.prototype.__LZHandleMultiNode s);
LzReplicationManager.addProperty("__LZHandleMultiNodes", function() {
Debug.debug("start replication for %w", this);
var layouts = this.parent && this.parent.layouts ? this.parent.layouts : [];
for (var i in layouts) {
var lay = layouts[i];
if (lay == null || lay['lock'] == null) {
Debug.warn("layout-error for %w for layout %w at pos %d", this, lay, i);
}
}
this.__LZHandleMultiNodes_old.apply(this, arguments);
});
]]></script>