Login  Register

load(path) does work in javascript, but not if called from a macro

Posted by lechristophe on Oct 30, 2014; 3:48pm
URL: http://imagej.273.s1.nabble.com/load-path-does-work-in-javascript-but-not-if-called-from-a-macro-tp5010245.html

Hi,

I have a script (javascript) that calls functions in another script using
load(path). It works fine in Fiji thanks to Johannes' work (see
http://imagej.1557.x6.nabble.com/Javascript-in-Fiji-does-not-work-anymore-td5008314.html
).

I have now made a toolset to launch these various scripts using the
runMacro(path) command. So what happens is that the Action Tool calls the
script#1 using runMacro(path1), and the script#1 calls functions in
script#2 using load(path2). However when I do this, I get an error (that
does not happen when launching script#1 directly:

ReferenceError: "load" is not defined (<Unknown source>#35) in <Unknown
source> at line number 35

Anyone knows what happens here, and knows how to work around/correct this?

Thanks,

Christophe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html