EngoTom
16 years agoVisitor
roRegistry
From page 85 of the component reference doc.
Why is the variable reg created? I only see sec being used in the following 2 functions.
Also... When calling this function, what does "return invalid" return? I need to if block the return value...
Finally... When calling SetAuthData() will this example take into account a null registry section or one already populated with data. If null I want to create and save data, if not null I want to overwrite value.
THX...
Why is the variable reg created? I only see sec being used in the following 2 functions.
Also... When calling this function, what does "return invalid" return? I need to if block the return value...
Finally... When calling SetAuthData() will this example take into account a null registry section or one already populated with data. If null I want to create and save data, if not null I want to overwrite value.
THX...
Function GetAuthData() As Dynamic
reg = CreateObject("roRegistry")
sec = CreateObject("roRegistrySection", "Authentication")
if sec.Exists("UserRegistrationToken")
return sec.Read("UserRegistrationToken")
endif
return invalid
End Function
Function SetAuthData(userToken As String) As Void
reg = CreateObject("roRegistry")
sec = CreateObject("roRegistrySection", "Authentication")
sec.Write("UserRegistrationToken ", userToken)
sec.Flush()
End Function