Player APIs (BrightScript & Ja...
...
Object Reference
Hashing and Storage Objects
roRegistrySection
6min
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 the javascript equivalent is registry docid\ txwoombd2 u12dfegx7ga (see brightscript javascript migration guide docid 2kewwxlmpycwu8tffuf2z for the method equivalents) object creation this object must be supplied with a registry section name upon creation createobject("roregistrysection", section as string) writes do not always take effect immediately to prevent the system from exceeding the maximum number of writes on the onboard persistent storage at most, 60 seconds after a write to the registry, the newly written data will be automatically written out to persistent storage if, for some reason, the change must be written immediately, then the flush() method should be called all changes will be written automatically prior to exiting the application ifregistrysection 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))