Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Forgive me if this is obvious or pointed out in docs but I cannot find any mention of it.
in my app when they select an option, there is a http fetch operation that takes at least a few seconds. I want to display a "loading" message while this happens so they dont' click over and over...
how is this done?
the only thread I found that mentioned this said to use screen.ShowMessage("Retrieving..."), but not sure how to use it. I tried m.screen.ShowMessage("Retrieving...") and received the error:
Interface not a member of BrightScript Component (runtime error &hf3)
which I assume means I'm using it incorrectly. can someone point me to the docs or more info on the correct way to do this?
Re: Showing a "loading" message for long operations
You need to create/show screen object first, there is no default/global screen in "m". And ShowMessage() is only avail for roPosterScreen and roGridScreen, i figure after searching for ShowMessage the doc wiki
Re: Showing a "loading" message for long operations
So the first thing to do when you see a message like
"Interface not a member of BrightScript Component (runtime error &hf3)"
would be to identify the source of the problem:
print type(m.screen)
Since "ShowMessage" only works (as far as I'm aware) with roPosterScreen and roGridScreen, if m.screen is not either one of those then of course you should get that message.
To show a Loading message over other screen types you would probably want to use roImageCanvas as it is the only type that will allow you to see most other screen types underneath it (if you want that).
Re: Showing a "loading" message for long operations
"RokuJoel" wrote: So the first thing to do when you see a message like "Interface not a member of BrightScript Component (runtime error &hf3)" would be to identify the source of the problem:
"Give a man a fish, and you feed him for a day; show him how to catch fish, and you feed him for a lifetime" indeed! :idea: