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

Newbie Q: Display New Screen?

in the "Simple Sign Up" sample app, in RokuBillingTask.brs, there is a function that brings up a new screen:


[size=100][/size]
sub GetPartialUserData()
    port = CreateObject("roMessagePort")
    channelStore = CreateObject("roChannelStore")
    channelStore.SetMessagePort(port)
    
    m.top.partialUserData = channelStore.GetPartialUserData("email") '<===BRINGS UP NEW SCREEN
end sub


Stepping through in the debugger, I see the new screen comes up when the following line is executed:


m.top.partialUserData = channelStore.GetPartialUserData("email")



I'm reading the docs but I haven't yet found a page that explains this. How does this bring up a new screen? It appears to just assign a value to the variable `m.top.partialUserData`.

Thanks in advance to all for any info and/or links to appropriate pages in the docs.
0 Kudos
1 REPLY 1
renojim
Community Streaming Expert

Re: Newbie Q: Display New Screen?

From the documentation for GetUserData:

"In order to call this function, the roChannelStore object needs to have a valid roMessagePort assigned to it by calling the ifChannelStore.SetMessagePort function. Also, since this method displays a dialog, the application must display a UI screen or canvas prior to calling the method. Otherwise, the behavior is undefined."

It brings up a dialog to get the user's ok.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
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.