I know task node works like thread and not support dialog inside a task node. But, Is there any way to open a dialog box inside a task node. I also used getparent(). But no luck. my code is below.
url="URL is Here"
m.req=createobject("roURLTransfer")
m.req.seturl(url)
m.port=createobject("roMessagePort")
m.req.setport(m.port)
m.req.asyncgettostring()
while true
msg=wait(100,m.port) '100 millisecond pause
if type(msg)="roUrlEvent" then
if msg.getresponsecode()=200 then
data=msg.getstring()
headers=msg.getresponseheadersarray()
exit while
else
m.req.asynccancel()
' Here I tried to print a dialog box
warningdialog = CreateObject("roSGNode", "Dialog")
warningdialog.title = "Warning"
warningdialog.message = "Not Valid Request."
warningdialog.buttons = ["Ok"]
m.top.dialog = warningdialog
m.top.dialog.observeField("buttonSelected", "warning")
end if
end if
end while
Here give me a warning not to exist dialog field. Is there any other option for this?