Home › Forums › General › Using Ctrlr › Demo panel for MIDI receive/transmit routines › Reply To: Demo panel for MIDI receive/transmit routines
October 15, 2017 at 10:25 pm
#73212
ok, this works: (hehe.. 😀 but i think the 2nd part could get rid of
all the ‘if/elseifs’ with another iteration -couldn’t get it to compile
like that though)
for i=1,4 do
local s=L(panel:getComponent("ledText"..i):getProperty("uiLabelTextColour"))
if s == "FFD28008" then
if i == 1 then panel:getComponent("lcd_presetData1"):setPropertyString("uiLabelText","saved1")
elseif i == 2 then panel:getComponent("lcd_presetData2"):setPropertyString("uiLabelText","saved2")
elseif i == 3 then panel:getComponent("lcd_presetData3"):setPropertyString("uiLabelText","saved3")
elseif i == 4 then panel:getComponent("lcd_presetData4"):setPropertyString("uiLabelText","saved4")
end
end
end