I have a custom TListView descendant that I originally created in D2007 and am now using in D2010. The control worked fine in D2007 without a problem, but in D2010 I'm experiencing sporadic but frequent instances in which the DFM cannot be loaded by the executable and throws an EReadError with message:
'Error reading lvPremiums.Items.ItemData: Stream read error'
where "lvPremiums" is the Name of my TListView descendant control. This occurs when I compile in the development environment. I have not edited any properties of the of the control but generally I've executed Save All from the menu. My list view descendant does not establish any Items by default, they're created at run time.
I can fix the problem by opening the Items property from the object inspector, then immediately click OK and saving the form again.
Visual inspection of the DFM file for a form that has been corrupted in this way shows property declaration within the lvPremium component of:
Items.ItemData = {}
This line is not present when the form has been "corrected" and is a runnable state.
Checking the source code for my TListView descendant, it does not contain the name "ItemData", nor can I find this documented in the TListItems help screen.
Having to correct that extraneous insertion into the DFM is becoming a bore since I use this component frequently, sometimes many times on a single form.
Can anyone suggest where my problem lies?