Streaming error of TListChartSource property DataPoints
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
The property DataPoints of TListChartSource can be used to easily create data for demo charts.
In r60425, the associated property editor has been extended to support multiple x values per data point.
While the extraction of chart data from the the DataPoints string list works correctly, a deviation can be observed after reading from lfm file.
Steps to reproduce:
- Create a new project
- Add a TListChartSource (chart not needed)
- Set both XCount and YCount to 2
- Click on the '...' next to "Datapoints" to open the property editor
- In the first row of the grid enter the values 1, 2, 3, 4 to the columns X1, X2, Y1 and Y2; columns Color and Text can be empty
- In the second row enter: 10, 20, 30, 40
- OK --> the object inspector displays the string
'1|2|3|4|?| 10|20|30|40|?|'
(the space before the "10" is a non-dispaying line break)
- Save
- Open the lfm file in an external edit: The Datapoints.Strings is correct:
DataPoints.Strings = (
'1|2|3|4|?|'
'10|20|30|40|?|'
)
- Load the project again into Lazarus
- Select the TListChartSource and look at the Datapoints property: Now it displays the string
'1|0|2|3|?| 10|0|20|30|?|'
Note the missing 4 and 40 as well as the inserted 0 between 1 and 2 as well as between 10 and 20.
Additional information:
Debugging during the loading of the form shows that XCount and YCount are not 2, but 1, at the time when the strings are analyzed.
Mantis conversion info:
- Mantis ID: 35125
- Version: 2.2