Roku Object Reference - imaginArt
Roku Object Reference - imaginArt
Roku Object Reference - imaginArt
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
oRegistry ()<br />
The registry is an area of memory where a small number of persistent settings can be stored. Access to the<br />
registry is available through the roRegistry object.<br />
This object is created with no parameters.<br />
• Create<strong>Object</strong>("roRegistry")<br />
The following methods are supported:<br />
• GetSectionList() As roList<br />
o returns a list with one entry for each registry section.<br />
• Delete(section As String) As Boolean<br />
o deletes the specified section and returns an indication of success.<br />
• Flush() As Boolean<br />
o flushes the registry out to persistent storage.<br />
roRegistrySection ()<br />
A section of the registry, enabling the organization of settings within the registry.<br />
This object must be supplied with a "section" name on creation.<br />
• Create<strong>Object</strong>("roRegistrySection", section As String)<br />
The roRegistrySection object implements the ifRegistrySection interface. This interface provides:<br />
• Read(key As String) As String<br />
o reads and returns the value of the specified key.<br />
• Write(key As String, value As String) As Boolean<br />
o replaces the value of the specified key.<br />
• Delete(key As String) As Boolean<br />
o deletes the specified key.<br />
• Exists(key As String) As Boolean<br />
o returns true if the specified key exists.<br />
• Flush() As Boolean<br />
o flushes the contents of the registry out to persistent storage.<br />
• GetKeyList() As roList<br />
o returns a list containing one entry per registry key in this section.<br />
Example:<br />
registrySection = Create<strong>Object</strong>("roRegistrySection", "widget-usage")<br />
' An empty entry will read as the null string and therefore be<br />
converted to zero.<br />
hits = val(registrySection.Read("big-red-button-hits"))<br />
hits = hits + 1<br />
registrySection.Write("big-red-button-hits", strI(hits))<br />
Writes do not always take immediate effect to prevent the system from exceeding the maximum number of<br />
writes on the I2C ROM. At most sixty seconds after a write to the registry it will automatically be written<br />
out to persistent storage. If for some reason the change must be written immediately then one of the flush<br />
functions should be called. Changes are automatically written prior to application exit.<br />
33