Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
NB_
Roku Guru

Re: Inside a task node open a dialogbox in Roku

Jump to solution

@chaklasiyanikun wrote:

...

Here give me a warning not to exist dialog field. Is there any other option for this?


seems to me you were on the right track, since wanting to display a modal dialog and that is easy to do using the .dialog field of the Scene. So you just have to grab the scene with getScene(). 

i'd do something like this: 

    dlg = createObject("roSGNode", "Dialog")
    port2 = createObject("roMessagePort")
    dlg.observeField("buttonSelected", port2)
    dlg.observeField("wasClosed", port2)

    dlg.title = "Warning"
    dlg.message = "Not a valid URL request"
    dlg.buttons = ["OK"]
    
    dlg.getScene().dialog = dlg                  
    while wait(0, port2) = invalid
        ' pass
    end while
    dlg.close = true 'out of propriety

 

Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.