This was working fine in firmware 3.1.7 (in beta), but I had to roll back to 3.1 because of the envelope control freezing the E1.
I was using this to identify which control had been changed:
function parameterMap.onChange (valueObjects, origin, value)
local paramNum = valueObjects[1]:getMessage():getParameterNumber()
end
…but now functions like ‘getMessage()’ and ‘getControl()’ get an error. If I print these:
print(valueObjects)
print(valueObjects[1])
print(valueObjects[1]:getMessage())
print(valueObjects["value"])
I get these results:
table: 0x20014440
userdata: 0x2001af30
error running function 'onChange': ctrlv2/p003.lua:137: attempt to index a userdata value (field 'integer index')
lua: nil
Similarly, the ‘getControl()’ function in the for loop in the manual throws the same ‘attempt to index a userdata value’ error
for i, valueObject in ipairs (valueObjects) do
local control = valueObject:getControl ()
print (string.format ("affects control value %s.%s",
control:getName (), valueObject:getId ()))
end