﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Issues  » RegistryRepository GetValue not working</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 07:38:55 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: RegistryRepository GetValue not working</title><link>http://forum.strataframe.net/FindPost8435.aspx</link><description>Ok, that makes total sense.&amp;nbsp; We can just use a string or an int value and convert to bool.&amp;nbsp; Thanks for the help.</description><pubDate>Mon, 23 Apr 2007 10:31:12 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RegistryRepository GetValue not working</title><link>http://forum.strataframe.net/FindPost8372.aspx</link><description>I have been using the RegistryRepository for a while now, and today came across an interesting bug.&amp;nbsp; I'm not sure if it just hasn't presented itself until now or if it was introduced recently.&amp;nbsp; When I do a GetValue and send in a DefaultValue it is not returning the DefaultValue if the value is&amp;nbsp;missing from&amp;nbsp;the registry.&amp;nbsp; It is always returning a False if the value is not there, and in the case of this bug it should be returning a True.&amp;nbsp; Any idea what is going on here?</description><pubDate>Mon, 23 Apr 2007 10:31:12 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: RegistryRepository GetValue not working</title><link>http://forum.strataframe.net/FindPost8411.aspx</link><description>Aha, I stepped through the sample and figured it out.&amp;nbsp; The ReadValue() method of the registry repository isn't meant to be called externally; it's supposed to be private, not public.&amp;nbsp; 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.&amp;nbsp; All of the ReadXX() methods like ReadString(), ReadInt32(), etc. all call the read value internally.&amp;nbsp; They test the return value of the ReadValue() and return the default value if passed directly.&amp;nbsp; The reason there is no read Boolean is that there is no Boolean data type in the Windows registry.&amp;nbsp; You have to use an integer and test for &amp;gt; 0 or use a string and parse the "true" or "false" from the string.&amp;nbsp; 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.&amp;nbsp; 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.</description><pubDate>Mon, 23 Apr 2007 08:33:41 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: RegistryRepository GetValue not working</title><link>http://forum.strataframe.net/FindPost8380.aspx</link><description>Okay, here's a little sample.&amp;nbsp; When you enter in a default value it should show up as that value when you click 'Get Value' since the value should be missing from the registry.&amp;nbsp; It works as it should for Int and String values.&amp;nbsp; But for the Boolean, it always returns False whether it is checked or not.&amp;nbsp; Maybe I'm doing something wrong in the code, in which case you could correct me.&amp;nbsp; Please let me know what you think.&amp;nbsp; Thanks for the help.</description><pubDate>Fri, 20 Apr 2007 11:39:08 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: RegistryRepository GetValue not working</title><link>http://forum.strataframe.net/FindPost8376.aspx</link><description>I cannot reproduce this behavior you are describing and&amp;nbsp;we use it everywhere.&amp;nbsp; Can you provide a sample that will replicate the behavior?</description><pubDate>Fri, 20 Apr 2007 10:58:59 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>