In my code jsc.tools is an object containing objects. Each sub-object contains a init() and run() method.
I have the following code running at startup:
for(tool in jsc.tools) {
tool.init();
}
which gives me the error "tool.init is not a function".
A sample of a tool's declaration is:
jsc.tools.sometool = {};
jsc.tools.sometool.run = function() {
// Apply tool
}
jsc.tools.sometool.init = function() {
// Set bits of data needed for the tool to run
}