
143
roRegistrySection
This object represents a section of the registry, enabling the organization of settings within the registry. It allows the
section to be read or written.
This object must be supplied with a "section" name upon creation.
CreateObject("roRegistrySection", section As String)
Interfaces: ifRegistrySection
The ifRegistrySection interface provides the following:
• Read(key As String) As String: Reads and returns the value of the specified key. Performing Read() on
an entry that does not exist, or on a key within a section that does not exist, will return an empty string ("").
• Write(key As String, value As String) As Boolean: Replaces the value of the specified key.
• Delete(key As String) As Boolean: Deletes the specified key.
• Exists(key As String) As Boolean: Returns True if the specified key exists.
• Flush() As Boolean: Flushes the contents of the registry out to persistent storage.
• GetKeyList() As roList: Returns a list containing one entry per registry key in this section.
Example:
registrySection = CreateObject("roRegistrySection", "widget-usage")
' An empty entry will read as an empty string and therefore be converted to zero.
hits = val(registrySection.Read("big-red-button-hits"))
hits = hits + 1
registrySection.Write("big-red-button-hits", strI(hits))
Commenti su questo manuale