Hi all, I’m new to roku development, and I’m encountering a strange error that I haven’t been able to debug. Was wondering if some of you gurus could lend me your eyes ![]()
Basically, I’m trying to create an intrinsic object to wrap up some json rpc functionality, and it keeps crashing whenever I access members of the object (both functions and data members crash).
Here’s how I create the object:
function CreateAPI(hostAddress = "" as string) as object
api = CreateObject("roAssociativeArray")
api.HostAddress = hostAddress
api.ClientID = ""
api.ReceiveResponse = API_Receive
api.Call = API_CALL
return api
end function
Here’s the function I’m testing with:
function debugAPI()
print "Creating API object"
api = CreateAPI("http://192.168.128.110/jsonrpc/")
print "Checking validity"
if api = invalid
print "API is invalid"
else
print "API is valid"
end if
print "Calling API(";api.HostAddress;")" <--- This line crashes
result = api.Call("Server.RegisterClient") <--- This one too
print "Execution successful"
end function
Any ideas what’s going on?
