Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
VikR0001
Level 7

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
renojim
Level 10

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
0 Kudos