Article Details
Id: | 19654 |
Product: | finPOWER Connect |
Type: | FIX |
Version: | 4.00.00 |
Opened: | 03/10/2022 |
Closed: | 04/10/2022 |
Released: | 21/12/2022 |
Job: | J029764 |
ISKeyValueList; changes to better handle Set methods with different data types
Changes have been made to ISKeyValueList to better handle Set methods with different data types.
Example One
If a key/value pair is set to a blank string, then updated to an Integer 0 - the value is left as a blank string.
Dim kvl As ISKeyValueList
kvl=finBL.CreateKeyValueList
' Add Value to a String as a blank value
kvl.SetString("Test","")
finBL.DebugPrint(kvl.GetString("Test"))
' Update Value to an Integer as 0
kvl.SetInteger("Test",0)
finBL.DebugPrint(kvl.GetString("Test"))
' Update Value to an Integer as 1
kvl.SetInteger("Test",1)
finBL.DebugPrint(kvl.GetString("Test"))
In previous versions this would print two blank lines and 1 - the second line should print a "0". With this change it correctly prints blank, 0 and 1.
Example Two
If a key/value pair is set to a text string, then updated to a Boolean False - the value is left as the original string.
Dim kvl As ISKeyValueList
kvl=finBL.CreateKeyValueList
' Add Value to a String with some text
kvl.SetString("Test","TEST")
finBL.DebugPrint(kvl.GetString("Test"))
' Update Value to a Boolean as False
kvl.SetBoolean("Test",False)
finBL.Debugprint(kvl.GetString("Test"))
In previous versions this would print TEST, TEST the second line should print False. With this change it correctly prints TEST, False.