Set minimum and maximum of newly created flonum

Nov 19, 2008 at 8:58am

Set minimum and maximum of newly created flonum


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


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

Nov 19, 2008 at 12:15pm

spent a whole day with a syntax problem like this yesterday.


theflonum.message(‘min’, 0);
theflonum.message(‘max’, 1);

and make sure you send this, after you created and wired theflonum.


Nov 19, 2008 at 12:45pm

Thanks, this works perfect!

Nov 19, 2008 at 6:42pm

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.

Nov 20, 2008 at 2:08pm

Id did try that, but it doesn’t work.


You must be logged in to reply to this topic.