thispatcher and creating comment boxes with ints
Hello~
I feel like I'm missing something really obvious here, but after banging my head against it and looking online for hours I can't seem to figure it out. This is my first time working with thispatcher and any help would be greatly appreciated.
I'm writing a patch that procedurally draws multisliders with footers and headers (in the form of comment boxes) that can be strings, ints, or floats. What I need is a script that accommodates these three data types and for some reason thispatcher doesn't want to draw comment boxes that contain ints or floats.
Here's the script I have now:
script newobject comment @text $1 @varname $1footer @patching_position $2 600
Everything is getting passed fine to thispatcher, the boxes are being drawn and named correctly, but if $1 is an int or float, the boxes are blank. I've worked around this by adding an exclamation mark after the first $1 in the script:
script newobject comment @text $1! @varname $1footer @patching_position $2 600
This works fine, it's just that all my labels look overly excited to be existing and I'd rather they didn't. :P
Thanks in advance!
Hi,
a workaround :
script newobject comment @varname $1footer @patching_position $2 600, script send $1footer set $1
maybe try [tosymbol] after the int/float, before going into [thispatcher] ? because you only need it for display, changing to a symbol shouldn't be a problem.
Thanks Ch, great idea and works just fine.
And seejay... yeah I thought of that too before posting but it didn't make a difference. I'm guessing this is a bug with [thispatcher].
cheers!