Set minimum and maximum of newly created flonum
Hello,
When I create a flonum with javascript like this:
theflonum = this.patcher.newdefault(300, 300, "flonum");
I can give it a scriptingname:
theflonum.varname = "flonum[0]";
But why can't i give it a min and max value? I tried:
theflonum.minimum = 0.;
theflonum.maximum = 1.; //With and without parenthes
and
theflonum.min = 0.;
theflonum.max = 1.; //With and without parenthes
I got the names from the attributes list (ctrl click on a inlet)
I'm using Max 5.0.5 on MacOS 10.5.4
spent a whole day with a syntax problem like this yesterday.
try
theflonum.message('min', 0);
theflonum.message('max', 1);
and make sure you send this, after you created and wired theflonum.
jrp
Thanks, this works perfect!
Does it work if you try:
theflonum.min = 0;
i.e. without the period after the zero. This is a common way to denote a float in max, although i'm not sure if js likes it.
Id did try that, but it doesn't work.