Question:
I populate the list view control with the required items and each of these items are set with a pre-defined structure in the data attribute of the list view item.
When I access the data in the structure through some code it works fine in most of the cases. But in some cases, the data attribute loses the structure information and causes an error while reading from the attribute. What is wrong?
Answer:
This is one of those situations where PowerBuilder lets you do something but I would not recommend it.
I don’t recommend that you populate the data attribute of the listviewitem with a structure. Instead, I would recommend that you have an unbound array of structures in your program and store the index to the array in your listviewitem. This makes it faster and removes the problems you are encountering.