#FEATURE by cg
class: Win32OperatingSystem::RegistryEntry class
added: #defaultValueFor:
--- a/Win32OperatingSystem.st Wed Jan 29 00:34:36 2020 +0100
+++ b/Win32OperatingSystem.st Wed Jan 29 13:30:17 2020 +0100
@@ -1092,7 +1092,6 @@
"Modified: 7.1.1997 / 19:36:11 / stefan"
! !
-
!Win32OperatingSystem class methodsFor:'OS signal constants'!
sigABRT
@@ -16640,6 +16639,24 @@
!Win32OperatingSystem::RegistryEntry class methodsFor:'registry access'!
+defaultValueFor:keyPath
+ "convenient accessing method;
+ Looks for the default value under keyPath;
+ returns nil if either not found, or no string value"
+
+ |k|
+
+ k := self key:keyPath.
+ k notNil ifTrue:[^ k defaultValue].
+ ^ nil
+
+ "
+ self defaultValueFor:'HKEY_LOCAL_MACHINE\Software\IronPython\2.7\InstallPath'
+ self defaultValueFor:'HKEY_LOCAL_MACHINE\Software\xxxIronPython\2.7\InstallPath'
+ self defaultValueFor:'xHKEY_LOCAL_MACHINE\Software\xxxIronPython\2.7\InstallPath'
+ "
+!
+
stringValueFor:valueName atKey:keyPath
"convenient accessing method;
Looks for a string value under keyPath;