I think you're making it more complicated than it needs to be. Just set the label's text value to the password/username.
<children>
<Label id="password" translation="[0,0]" text="" visible="false" />
</children>
password = m.top.findNode("password")
...
password.text = "user's password"
In your main thread:
sg = createObject("roSGScreen")
scene = sg.createScene("SignInScene")
sg.Show()
sg.setMessagePort(m.port)
password = scene.findNode("password")
password.observeField("text", m.port)
while(true)
msg = wait(0,m.port)
msgType = type(msg)
print "msgType: ";msgType
if msgType = "roSGScreenEvent" then
if msg.isScreenClosed() then
print "isScreenClosed"
exit while
end if
else if msgType = "roSGNodeEvent" then
passwordText = password.text
end if
end while
I hope that's enough to get the point across. It may not be the
best approach, but it works for me.
-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.