Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Aha, I stepped through the sample and figured it out. The ReadValue() method of the registry repository isn't meant to be called externally; it's supposed to be private, not public. If the ReadValue() method cannot retrieve the value, the ByRef parameter is set to Nothing, and when you set a value type to Nothing, it defaults to the "default" value for that value type. All of the ReadXX() methods like ReadString(), ReadInt32(), etc. all call the read value internally. They test the return value of the ReadValue() and return the default value if passed directly. The reason there is no read Boolean is that there is no Boolean data type in the Windows registry. You have to use an integer and test for > 0 or use a string and parse the "true" or "false" from the string. I'll add an enhancement request to add a ReadBoolean that stores values in a WORD registry type and uses 0 for False and 1 for True. In the meantime, you can add your own ReadBoolean or just test on the return value of the ReadValue() method; it will tell you whether the value was successfully retrieved from the database.
|