Forum Discussion
joetesta
8 years agoRoku Guru
I think you're almost there, But you can't expect m.top.content to be set immediately after you call the task. You need to wait for a callback and process it there.
>> no, result will be in "m.haamro.HTTPcontent" in "gotContent" sub, not here, and not in "m.top.content". If you don't want to / can't re-use gotContent sub, then you can set a new different observer on m.haamro to handle the response differently than gotContent:
html=m.top.content <-- isn't m.top.content now set ??
>> no, result will be in "m.haamro.HTTPcontent" in "gotContent" sub, not here, and not in "m.top.content". If you don't want to / can't re-use gotContent sub, then you can set a new different observer on m.haamro to handle the response differently than gotContent:
m.haamro.ObserveField("HTTPcontent","newDifferentFunction")
...
sub newDifferentFunction()
m.top.content = m.haamro.HTTPcontent
' or '
html = m.haamro.HTTPcontent
print html
end sub