Re: load(path) does work in javascript, but not if called from a macro
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Nov 01, 2014; 11:25pm
URL: http://imagej.273.s1.nabble.com/load-path-does-work-in-javascript-but-not-if-called-from-a-macro-tp5010245p5010279.html
On Oct 30, 2014, at 11:48 AM, Christophe Leterrier <
[hidden email]> wrote:
>
> 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?
Upgrade to the latest ImageJ daily build (1.48k6). The JavaScript interpreter in earlier versions does not support the load(path) function.
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html