Forums > MaxMSP

how to make $1 inside double quotes work / setting textbutton's text attribute

July 7, 2012 | 3:03 pm

hello

when setting textbutton’s text attribute, it reads only the first word after word ‘text’.
so sending it message like [she ate $1 blotters] would set it to "she" word only
when i change it to ["she ate $1 blotters"] (quotes added), then the $1 will not work and text on button is set to "she ate $1 blotters" instead of "she ate 3 blotters"
how to find a way around this?
i tried escaping the spaces, but message [she ate $1 blotters] is automatically changed to ["she ate $1 blotters"] by max.
then i tried having [she ate $1 blotters] message separately, and prepending/appending or joining or combining with [text "] and ["] messages, which gave me correct output when checked using a connection to [print] object, but when connected to textbutton, the text attribute was set to:
"she
only. as if the " were still escaped.

anybody has some idea please? how would you set text attribute of textbutton to something containing variable?



pid
July 7, 2012 | 3:10 pm
– Pasted Max Patch, click to expand. –

July 7, 2012 | 3:18 pm

godbless ya! thanks


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