Undocumented textjustification syntax
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:
Sending
"textjustification 1"
centers text. Sending
"textjustification center"
doesn't.
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
whoa, center-justified message and comment boxes? I've wanted those for ages...!
gotta try it out...
Yes, this is new to Max 6.1.3.
@radio wonderland: this is the expected behavior, textjustification takes an int as argument.
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?
The reference says the argument is an int. Although it would be nicer if you would see the numbers... Request noted.
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~ .