PropertyChanged subscription on parameter named "Pan"

Post Reply
User avatar
UNZ
Posts: 808
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

PropertyChanged subscription on parameter named "Pan"

Post by UNZ »

i observed something strange: my machine, mixio, has a parameter named "Pan".
when i try to subscribe to propertychanged on it, it observes the buzz pan.

Pan_ValueChanged(machine.GetParameter("Pan"), 0);

i could rename it but it would break backwards compatibility (?).
is there a way i can separate the two without renaming my param ? is there maybe some convetion how buzz renames a parameter that collides with an internal one ?
User avatar
UNZ
Posts: 808
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PropertyChanged subscription on parameter named "Pan"

Post by UNZ »

the solution was to use:

Pan_ValueChanged(machine.AllNonInputParameters().First(p => p.Name == "Pan"), 0);
User avatar
strobotone
Posts: 297
Joined: Wed Nov 23, 2011 2:59 pm
Location: berlin
Contact:

Re: PropertyChanged subscription on parameter named "Pan"

Post by strobotone »

that´s it. i am seriously quitting my job and get into c# and c++ .
Post Reply