(note: Even if there is another contraption out there that someone’s already made that does exactly what this does and more, that’s nice, but I don’t care about that right now; I want to know the solution to this problem so that I can learn how to script things myself.)
I feel really silly for asking this, but for whatever reason, I cannot for the life of me figure this out. I’m trying to make a contraption that will draw colored text on a colored background using a canvas, because I’m working on a project where I wanted to add a bunch of text boxes all formatted in this way. Just effectively plain field widgets, except they can have different background colors. Using the Decker and Lil documentation, as well as referencing some other pre-built contraptions, I managed to get the contraption set up with custom attribute fields that can be used to edit the contents, and all of that. However, when I placed my contraption, filled in the attributes, then tested it, nothing happened; it remained as a blank canvas. When I went back to check the attribute fields, the values that I had just put in were also completely gone.
I’m assuming the problem is that I’ve failed to “grab onto” the values put into the attributes somehow in the contraption’s code. In trying to fix this, I have been trying to use the “get” and “set” functions, assuming that maybe I have to use those to grab the values entered into the attributes first. But to be quite honest, I don’t really understand the difference between them at all. I saw that the keyword itself of “value” in Decker scripts references the data of non-Canvas widgets, such as a button’s “value” being a boolean for whether or not it is pressed, but I was confused as to whether or not this applies to the attributes, and/or referencing them?
Also, in Decker’s documentation, I see both “value” and “val” being used seemingly interchangeably? Are “value” and “val” two ways of writing the same variable, or am I misinterpreting this, and “val” just its own variable being used and set for tutorial purposes?
(edit: to clarify, the code I note as working in a card script was also just copy-pasted as is into the contraption, with the reference names for the attributes substituted into it)


