Gijsen Member Licensed User Longtime User Dec 25, 2019 #1 When adding checkboxes in a customlistview, how can you check which checkboxes have been checked ? Sub Process_Globals Type ItemValue(cbPerson As Checkbox) Dim cbPerson as Checkbox Sub GetPeople dim iv As ItemValue For i = 0 to clvPeople.Size - 1 iv = clvPeople.GetValue(i) Log(iv.cbPerson.Tag) Next End Sub This throws a nice error
When adding checkboxes in a customlistview, how can you check which checkboxes have been checked ? Sub Process_Globals Type ItemValue(cbPerson As Checkbox) Dim cbPerson as Checkbox Sub GetPeople dim iv As ItemValue For i = 0 to clvPeople.Size - 1 iv = clvPeople.GetValue(i) Log(iv.cbPerson.Tag) Next End Sub This throws a nice error
Gijsen Member Licensed User Longtime User Dec 25, 2019 #2 The error I get is [<__NSCFNumber 0xace5ec467120d875> valueForUndefinedKey:]: this class is not key value coding-compliant for the key cvPerson. Upvote 0
The error I get is [<__NSCFNumber 0xace5ec467120d875> valueForUndefinedKey:]: this class is not key value coding-compliant for the key cvPerson.
Gijsen Member Licensed User Longtime User Dec 25, 2019 #3 Sorry found the issue. clvLeden.Add(CreateTeamItem(rs.GetInt("id"), rs.GetString("naam"), iv), iv) instead of clvLeden.Add(CreateTeamItem(rs.GetInt("id"), rs.GetString("naam"), iv), rs.GetInt("id")) fixed the probme. Upvote 0
Sorry found the issue. clvLeden.Add(CreateTeamItem(rs.GetInt("id"), rs.GetString("naam"), iv), iv) instead of clvLeden.Add(CreateTeamItem(rs.GetInt("id"), rs.GetString("naam"), iv), rs.GetInt("id")) fixed the probme.