joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2012
03:37 PM
Documentation of Registry functions is where?
Hello -
I'm looking for some documentation of the functions "RegRead" & "RegWrite"
I found the functions in the example "register" channel but haven't been able to find documentation explaining the nature of the passed values. Am I missing something? Can someone explain what's what here:
RegWrite("RegToken", token, "Authentication")
I assume token is the variable value that was passed into: Sub saveRegistrationToken(token As String)
RegToken is ?
Authentication is ?
tyvmia
I'm looking for some documentation of the functions "RegRead" & "RegWrite"
I found the functions in the example "register" channel but haven't been able to find documentation explaining the nature of the passed values. Am I missing something? Can someone explain what's what here:
RegWrite("RegToken", token, "Authentication")
I assume token is the variable value that was passed into: Sub saveRegistrationToken(token As String)
RegToken is ?
Authentication is ?
tyvmia
aspiring
1 REPLY 1


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2012
03:51 PM
Re: Documentation of Registry functions is where?
RegRead() and RegWrite() are just utility BrightScript functions in some of the example code. They use the roRegistry and roRegistrySection components to do their thing.
http://sdkdocs.roku.com/display/RokuSDKv48/roRegistry
http://sdkdocs.roku.com/display/RokuSDK ... trySection
The registry stores key/value pairs, so in the case of RegWrite the first two args are the key and value. The third arg is the section of the registry space to save the key/value pair to. Most channels will just have one section they use for everything, but additional sections are handy if you have multiple channels sharing the same registry space.
http://sdkdocs.roku.com/display/RokuSDKv48/roRegistry
http://sdkdocs.roku.com/display/RokuSDK ... trySection
The registry stores key/value pairs, so in the case of RegWrite the first two args are the key and value. The third arg is the section of the registry space to save the key/value pair to. Most channels will just have one section they use for everything, but additional sections are handy if you have multiple channels sharing the same registry space.
Function RegWrite(key as String, val as String, section=invalid) as Void
if section = invalid then section = "Default"
sec = CreateObject("roRegistrySection", section)
sec.Write(key, val)
sec.Flush() ' commit it
End Function