LucaMs Expert Licensed User Longtime User May 4, 2018 #1 SetValue(Index As Int, Value As Object) method. Last edited: May 4, 2018
Erel B4X founder Staff member Licensed User Longtime User May 6, 2018 #2 1. You can use GetRawListItem to access all the item attributes and update the value. If you don't see this method then add it: Code: Copy Public Sub GetRawListItem(Index As Int) As CLVItem Return items.Get(Index) End Sub (it will be included in the next version of xCLV). 2. Better option is to use a custom type for the value and update it: Code: Copy Dim Value As MyValue = CLV.GetValue(index) Value.Score = 200
1. You can use GetRawListItem to access all the item attributes and update the value. If you don't see this method then add it: Code: Copy Public Sub GetRawListItem(Index As Int) As CLVItem Return items.Get(Index) End Sub (it will be included in the next version of xCLV). 2. Better option is to use a custom type for the value and update it: Code: Copy Dim Value As MyValue = CLV.GetValue(index) Value.Score = 200
LucaMs Expert Licensed User Longtime User May 6, 2018 #3 Erel said: 1. You can use GetRawListItem to access all the item attributes and update the value. If you don't see this method then add it: Click to expand... I prefer not to say what I tried. I do not say that in the past days I have seen that the values are stored in the Items List and that I tried to remove an element and insert the new value in the same place (index) because I did not remember the simple ListX.Set command. I do not write it Then it's very easy to add the SetValue to xCLV: Code: Copy Public Sub SetValue(Index As Int, Value As Object) items.Set(Index, Value) End Sub [I don't like too much the contextual help: I would change the word "item" to "value" ] Erel said: 2. Better option is to use a custom type for the value and update it: Click to expand... Very good solution (although adding the new method is better, of course). Last edited: May 6, 2018
Erel said: 1. You can use GetRawListItem to access all the item attributes and update the value. If you don't see this method then add it: Click to expand... I prefer not to say what I tried. I do not say that in the past days I have seen that the values are stored in the Items List and that I tried to remove an element and insert the new value in the same place (index) because I did not remember the simple ListX.Set command. I do not write it Then it's very easy to add the SetValue to xCLV: Code: Copy Public Sub SetValue(Index As Int, Value As Object) items.Set(Index, Value) End Sub [I don't like too much the contextual help: I would change the word "item" to "value" ] Erel said: 2. Better option is to use a custom type for the value and update it: Click to expand... Very good solution (although adding the new method is better, of course).
LucaMs Expert Licensed User Longtime User May 6, 2018 #4 Notice that then I solved changing my project, I did in a very different way, very complicated. It is better not to write this either Last edited: May 6, 2018
Notice that then I solved changing my project, I did in a very different way, very complicated. It is better not to write this either