After long time, I try again with the copy group item. It's a useful thing when you need more than 1 of an item, but you don't know how many.
I feel like after changing an item value, and redrawing the window, all the default data overwrites the changes I made. Here's an example:
| Code: |
Rainlendar_Log("Current pressed button: " .. id)
if (aux == "font.bold") then
Rainlendar_SetItemValue(window, "Todo List.text" .. id, "element", "font.normal")
Rainlendar_SetItemValue(window, "Todo List.text" .. id, "text", id)
else
Rainlendar_SetItemValue(window, "Todo List.text" .. id, "element", "font.bold")
Rainlendar_SetItemValue(window, "Todo List.text" .. id, "text", "NONE")
end
aux = Rainlendar_GetItemValue(window, "Todo List.text" .. id, "text")
Rainlendar_Log("Current text (before redraw): " .. aux)
Rainlendar_Redraw(0, window)
aux = Rainlendar_GetItemValue(window, "Todo List.text" .. id, "text")
Rainlendar_Log("Current text (after redraw): " .. aux)
return True
|
Rainlendar log:
19:37:56: [0:21:20.532] Current pressed button: .1.3
19:37:56: [0:21:20.532] Current text (before redraw): NONE
19:37:56: [0:21:20.542] Current text (after redraw):
19:37:57: [0:21:21.365] Current pressed button: .1.5
19:37:57: [0:21:21.365] Current text (before redraw): NONE
19:37:57: [0:21:21.376] Current text (after redraw):