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

Discuss problems and solutions.
Post Reply
FriFlo
Newbie
Posts:32
Joined:07 Dec 2011 17:49
Cannot change the 'name' attribute on fader ...

Post by FriFlo » 17 Mar 2017 03:30

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 ...

Code: Select all

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 ...

Code: Select all

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?

MrCorba
Regular
Posts:143
Joined:02 Sep 2013 20:17
Location:Netherlands

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

Post by MrCorba » 20 Mar 2017 21:53

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.
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba

Post Reply