Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur

Ambiguous Call

by tprovoost / Thomas Provoost

This script shows how to resolve an Ambiguous error raised by JavaScript.

version 1 (last version):

download to use and modify in Icy. How do I use scripts ? A Problem ? ask the community.
Changelog for this version: initial version

seq = getSequence()

 * The following method will not work, run it and look at the error 
 * message. Then, comment the following line.
result = Thresholder.threshold(seq, 1, [127], false)

 * In fact JavaScript doesn't know which function to call,
 * and therefore asks you to be more specific.
 * JavaScript lets you choose between two calls:
 * 	- class icy.sequence.Sequence threshold(icy.sequence.Sequence,int,double[],boolean)
 *	- class icy.sequence.Sequence threshold(icy.sequence.Sequence,int,double[][],boolean)
 * Copy only the method without the "class" and the return type, 
 * and write the following:
result = Thresholder["threshold(icy.sequence.Sequence,int,double[],boolean)"](seq, 1, [127], false)

// in [], as a string, there is the specific call you want to use
// However, you still have to give the parameters


This script has no documentation. A Problem ? ask the community.

Icy script publication Id : R5J8A7