I am getting the following error... What would cause this...
BRIGHTSCRIPT: ERROR: roSGNode.ObserveField: no active host node: pkg:/source/API.brs(37)
How can I fix this? This is occuring in a task
function API__Login(userData as Object) as Boolean
result = true
print "Logging in user:"
account = userData
m.LoginTask = createObject("RoSGNode","LoginTask")
m.LoginTask.account = account
m.LoginTask.observeField("results","loginResult")
m.LoginTask.control = "RUN"
sleep(2000)
return result
end function
sub loginResult()
if m.LoginTask.results.user.id <> invalid then
print "registry write"
RegWrite("stuff",m.LoginTask.results.user.stuff)
end if
end sub
The task runs but loginResult never is called.