Troubleshooting

Cannot change the 'name' attribute on fader ...

Started by FriFlo on .

Sign in or create an account to join the conversation.

2 posts

Topic starter
And here comes another one I cannot figure out:

I just tried to change the actual name of a Fader object upon receiving sysex. I set up a Fader with a script.

When I script ...
decl FaderName=Fader;
setattribute(FaderName,'unit',arraytostring(subarray(MIDI_ARGS,Start2,Start3-Start2-1)));
.. the display in "unit" is exactly what I sent via Sysex. Start2 and Start3 are variables I defined before by searching the correct places in the Sysex with a while loop. But this works!

But when I script ...
decl FaderName=Fader;
setattribute(FaderName,'name',arraytostring(subarray(MIDI_ARGS,Start2,Start3-Start2-1)));
... Fader label still reads Fader. Note, that I used the variable to define the name of the fader object to be able to change it after the name became changed. Why is this not working? The attribute 'name' is mentioned in the manual, so it should work the same way as with the 'unit'-variable, shouldn't it?
The setattribute(object, 'name', ....) doesn't seem to work on any object. Which actually makes sense, because if you change the name from Fader to Fader2, all script which have Fader.x = something become invalid and with an error.

That leaves the question, why would they put it in there? No one knows......

I'm afraid the only way to change a "label" of an object is to use the TextObject and put that on top of the fader.