BUG: Graph: AutoInc Increments ThisPoint Instead of ThisSetLast reviewed: June 21, 1995Article ID: Q81999 |
The information in this article applies to:
- Professional Edition of Microsoft Visual Basic for Windows, versions 2.0 and 3.0- Microsoft Professional Toolkit for Microsoft Visual Basic programming system for Windows, version 1.0
SYMPTOMSThe Graph custom control version 1.2 has four array properties: ColorData, LegendText, PatternData, and SymbolData. The values of these properties directly affect sets of data rather than the individual points in the sets. With the AutoInc property set to True, assigning a value to these four arrays will increment ThisPoint rather than ThisSet. This behavior is a potential cause of logic errors in code.
WORKAROUNDTo work around the potential logic problems caused by incrementing ThisPoint, you should occasionally reset the AutoInc incrementing position by assigning values for ThisSet and ThisPoint in your code. A second workaround is to set AutoInc to False (AutoInc=0), and explicitly set ThisSet and ThisPoint before entering a piece of data.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThere are eight array properties in Graph: GraphData, ExtraData, LabelText, XPosData, ColorData, LegendText, PatternData, and SymbolData. To access an individual point in these arrays, you need to set the ThisSet and ThisPoint properties to indicate that point. If AutoInc is set to True (AutoInc=1), Graph will automatically set the ThisPoint and ThisSet properties. AutoInc increments ThisSet and ThisPoint differently, depending on which property is being accessed. AutoInc will increment both ThisSet and ThisPoint when adding data to the GraphData property. For all other array properties (ExtraData, LabelText, XPosData, ColorData, LegendText, PatternData, and SymbolData), AutoInc will only increment ThisPoint. The data that you assign to the ExtraData, LabelText, and XPosData apply to the individual points of a set, so logically AutoInc should only increment ThisPoint. However, the data that you assign to the ColorData, LegendText, PatternData, and SymbolData array properties apply to the separate sets. In these cases, AutoInc should logically be incrementing the ThisSet property, but in practice it increments only the ThisPoint property. Note: AutoInc is incrementing the proper values internally, so the data assigned to these four array properties is accurate and will function properly. AutoInc displays its progress by also incrementing ThisPoint, which is not always the logical choice. The following example demonstrates how AutoInc increments ThisPoint and ThisSet when assigning values to ColorData. To test another array property, substitute that array name for ColorData.
Steps to Reproduce Problem
|
Additional reference words: buglist1.00 buglist2.00 buglist3.00 1.00 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |