defaults=newArray(STRATLISTE.length); not working

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

defaults=newArray(STRATLISTE.length); not working

olivier-2
Hello
I have a new problem starting today with this kind of lines:
defaults=newArray(STRATLISTE.length);
I have an error later in the macro; all arrays define this way are array[1].

If I use :
A=STRATLISTE.length;
defaults=newArray(A);
it works.
What is wrong here ?

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: defaults=newArray(STRATLISTE.length); not working

Herbie
Good day Olivier,

maybe something is wrong with the definition of your array "STRATLISTE".

The following code lines show that "newArray(STRATLISTE.length);" works
as expected:

STRATLISTE = newArray(0,1,2,3,4,5,6,7,8,9);
defaults = newArray(STRATLISTE.length);
Array.fill(defaults, 10);
Array.show(defaults);

Regards

Herbie

:::::::::::::::::::::::::::::::::::::
Am 09.03.18 um 11:47 schrieb olivier:

> Hello
> I have a new problem starting today with this kind of lines:
> defaults=newArray(STRATLISTE.length);
> I have an error later in the macro; all arrays define this way are array[1].
>
> If I use :
> A=STRATLISTE.length;
> defaults=newArray(A);
> it works.
> What is wrong here ?
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: defaults=newArray(STRATLISTE.length); not working

ctrueden
In reply to this post by olivier-2
Hi Olivier,

Might it be related to this issue?
  https://github.com/imagej/imagej/issues/192

If so, try with the latest daily build and see if the issue is fixed.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Fri, Mar 9, 2018 at 4:47 AM, olivier <[hidden email]> wrote:

> Hello
> I have a new problem starting today with this kind of lines:
> defaults=newArray(STRATLISTE.length);
> I have an error later in the macro; all arrays define this way are
> array[1].
>
> If I use :
> A=STRATLISTE.length;
> defaults=newArray(A);
> it works.
> What is wrong here ?
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: defaults=newArray(STRATLISTE.length); not working

olivier-2
In reply to this post by olivier-2
Exact
I have to update ImageJ indepently of Fiji (not updating to 1.51v).
This solves the problem. It was not a problem from my side.
Thanks

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