これは、問題を再現するために取得できた最小のスニペットです。
Sub Main()
u = getStringFromKeyboard("Enter username")
p = getStringFromKeyboard("Enter password")
End Sub
Function getStringFromKeyboard(message = "" As String) As String
result = ""
port = CreateObject("roMessagePort")
screen = CreateObject("roKeyboardScreen")
screen.SetMessagePort(port)
screen.SetDisplayText(message)
screen.AddButton(1, "OK")
screen.Show()
while true
print "waiting..."
msg = wait(0, port)
print "done waiting"
if type(msg) = "roKeyboardScreenEvent" then
if msg.GetIndex() = 1 then
result = screen.GetText()
exit while
end if
end if
end while
screen.Close()
return result
End Function
Rokuはユーザー名の入力を正しく求めますが、パスワードの入力を求める前にメインメニューに戻るだけです。デバッグ出力は、アプリがwait()の2回目の呼び出しで中断していることを示しています。
waiting...
done waiting
waiting...
これはSDKv4.1およびOSv4.2.1006です。
誰かが何が起こっているのか考えていますか?