dan19
5 years agoBinge Watcher
How to write an Array to Registry in BrightScript
Hello guys,
I am trying to write an array to a registry section. I don't know if this is possible, but it is neither reading back the value, nor throwing an error, so I thought to ask here.
Example of what I am trying to do:
someStates = ["Florida", "New York", "Texas"]
statesList = CreateObject("roRegistrySection", "statesList")
statesList.WriteMulti(someStates)
statesList.flush()
Maybe I did not add enough code in the explanation to support your example
someStates = {state1:"Florida", state2:"New York", state3:"Texas"}
data=FormatJson(someStates)
?data
?type(data)sec=CreateObject("roRegistrySection", "states")
sec.Write("statelist", data)
sec.Flush()
if sec.Exists("statelist")
statesFromRegistry=sec.Read("statelist")
StatesList=ParseJson(statesFromRegistry)
?StatesList
?type(StatesList)
end if