abstraction that load variable into an object?

R_Gol's icon

I made an abstraction and gave it a name.

when I place this abstraction object and add it an id (lets say SUN) it will replace the #1 in the route object but will not do it in the sprintf object.

how can I make it to replace the 1# in the sprintf object a well?

TFL's icon

#0, #1, etc. work only if they are the first characters of a string, so that's why it won't work in your [sprintf]. It is explained in the Unique identifier section but I admit it should be mentioned in the Arguments and attributes section too.

Maybe [combine] will help you there, or just replace #1 by %s and connect a [loadmess #1] to the corresponding inlet.

R_Gol's icon

Thanks for this. works great. I have related question.

how can I translate a string with spaces to replace the spaces with _ ?

edit: this is one option:

TFL's icon

Here are a few more options:

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon

yes, regexp - or itoa. all other methods will fail to understand what a space character is.