I am having no lucking getting local storage to work for "roRegistrySection". It looks correct, and I've tried several variations, but the "read" never finds what was written. I don't get any errors, but I also don't get any stored codes. What am I missing?
Here's the current code:
Function GetStoredRegCode() As Dynamic
REM registry = CreateObject("roRegistry")
sec = CreateObject("roRegistrySection", "Authentication")
if sec.Exists("UserRegistrationToken")
print "Exists: UserRegistrationToken"
code = sec.Read("UserRegistrationToken")
print "Found Stored RegCode: " + code
return code
else
print "DOES NOT Exist: UserRegistrationToken"
endif
return invalid
End Function
Function SetStoredRegCode(regCode As String) As Void
print "Storing: UserRegistrationToken " + regCode
REM registry = CreateObject("roRegistry")
sec = CreateObject("roRegistrySection", "Authentication")
sec.Write("UserRegistrationToken ", regCode)
sec.Flush()
End Function