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: 
idunno
Visitor

How Do I Use ShowPleaseWait

I have this function

Function ShowPleaseWait(title As dynamic, text As dynamic) As Object

port = CreateObject("roMessagePort")
dialog = invalid


if text = ""
dialog = CreateObject("roOneLineDialog")
else
dialog = CreateObject("roMessageDialog")
dialog.SetText(text)
endif

dialog.SetMessagePort(port)
dialog.SetTitle(title)
dialog.ShowBusyAnimation()
dialog.Show()
return dialog
End Function


However when I call it like so:

if index = 6 and over = 1
ShowPleaseWait("","Retrieving Clips")
Print "ShowPleaseWait"

chooseStreams = 1
m.canvas.clearLayer(6)
print "select worked"

m.canvas.AllowUpdates(false)
m.canvas.SetLayer(5, [

I never see the ShowPleaseWait screen, even though a print statement placed in the function will actually print, so I know its actually going through the function. Anyone have any idea what I'm doing wrong?
0 Kudos
3 REPLIES 3
idunno
Visitor

Re: How Do I Use ShowPleaseWait

Never mind figured it out. Added

waitobj = ShowPleaseWait("","Retrieving Clips")


Obvious in hindsight, but now the Showpleasewait screen runs indefinitely. How Does it know when to stop?
0 Kudos
belltown
Roku Guru

Re: How Do I Use ShowPleaseWait

waitObj.Close ()
0 Kudos
idunno
Visitor

Re: How Do I Use ShowPleaseWait

Thanks, that solved my problem.
0 Kudos
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.