Forums > MaxMSP

Undocumented textjustification syntax

July 3, 2013 | 5:24 pm

Stop me if you’ve heard this before. I stumbled on it while fiddling with attrui, trying to figure out why my scripting failed.

Dig it: textjustification attribute values "left", "center" & "right" must
be sent as "0", "1" & "2" respectively.

Try it with textedit, message box or comment:


"textjustification 1"

centers text. Sending

"textjustification center"


This also seems to go for sendbox messages, script sendbox messages to thispatcher, and the corresponding javascript for all of the above.

Max 6.1.3 Mountain Lion

July 3, 2013 | 7:19 pm

whoa, center-justified message and comment boxes? I’ve wanted those for ages…!

gotta try it out…

July 4, 2013 | 7:47 am

Yes, this is new to Max 6.1.3.

@radio wonderland: this is the expected behavior, textjustification takes an int as argument.


— Pasted Max Patch, click to expand. —


July 4, 2013 | 8:35 am

Yes, it’s there if you look at attrui, but nowhere in the documentation as far as I can tell. So is attrui a better guide than the reference pages?

July 5, 2013 | 11:23 pm

The reference says the argument is an int. Although it would be nicer if you would see the numbers… Request noted.

July 6, 2013 | 6:10 am

Whaat? Imposs–

Oh. What was I looking at? I don’t know. Maybe some examples. Oops.

While I have you on the phone? This also stumps me, in scripting objects–why function-like syntax assigns values to attributes, but in at least one case that fails and assignment-like syntax works instead. (I sort of intuitively get it, but I don’t really understand.)
tempObj.presentation(1); //right syntax
tempObj.bgcolor(1, 1, 1, 0.25); //right syntax
tempObj.readonly(1); //right syntax
tempObj.fontname("Helvetica"); //right syntax
tempObj.fontsize(96); //right syntax
tempObj.patching_rect(coords); //right syntax
tempObj.varname(name_it); //wrong syntax!!!!!!!!!!!!!!!!!!!!!!!!!!
tempObj.varname = name_it; //right syntax

But there are more important things. Like polybuffer~ .

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP