Arezth
9 years agoVisitor
Using roUrlTransfer from within a scene
Hi Forum
I appreciate the help I've gotten so far from you. I came here with a new question. I've tried to create a roUrlTransfer from a scene I've loaded, but as expected it says it is invalid or unitialized. My main.brs is as followed:
Within this main.brs, I make a few calls using CreateObject("roUrlTransfer") without any problems, but when I tried to create this within my "HomeScene" it wasn't possible. After checking the forum it said that I should use interfaces in order to make the calls, but as far as I understood it can not be referenced directly (it seems roSgNode does not support objects). Global variable is not an option either. Some people create functions in order to make it happen, but I did not understand it fully ( https://forums.roku.com/viewtopic.php?f ... ne#p533154) Am I too far from the correct way? Can I get some guidance?
I appreciate the help I've gotten so far from you. I came here with a new question. I've tried to create a roUrlTransfer from a scene I've loaded, but as expected it says it is invalid or unitialized. My main.brs is as followed:
sub RunUserInterface()
screen = CreateObject("roSGScreen")
scene = screen.CreateScene("HomeScene")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
screen.Show()
....
scene.gridContent = ParseJsonContent(list)
...
while true
msg = wait(0, port)
print "--------- o --------"
print "msg = "; msg
print clock
end while
if screen <> invalid then
screen.Close()
screen = invalid
end if
end sub
Within this main.brs, I make a few calls using CreateObject("roUrlTransfer") without any problems, but when I tried to create this within my "HomeScene" it wasn't possible. After checking the forum it said that I should use interfaces in order to make the calls, but as far as I understood it can not be referenced directly (it seems roSgNode does not support objects). Global variable is not an option either. Some people create functions in order to make it happen, but I did not understand it fully ( https://forums.roku.com/viewtopic.php?f ... ne#p533154) Am I too far from the correct way? Can I get some guidance?