Reply To: Demo panel for MIDI receive/transmit routines

Home Forums General Using Ctrlr Demo panel for MIDI receive/transmit routines Reply To: Demo panel for MIDI receive/transmit routines

#73212
human fly
Participant
  • Topics: 124
  • Replies: 1070
  • Total: 1194
  • ★★★★

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
Attachments:
You must be logged in to view attached files.
Ctrlr