我试图实现从一个动作读取用户输入并在其他屏幕中读取,如:
user: xx
Bixby: who's there?
user: yyy
Bixby: yyy who?
I am able to read user input yyy but unable to pass in different actions to display yyy who.
你可以帮助或指导我做错了什么或者做这种胶囊的最佳方法是什么?
提前致谢。
这就是我如何模拟你可能想要实现的行为。
Concepts
- Joke
- JokeQuestion (posed by 'Bixby')
- JokeAnswer (answered by User)
Views
- JokeResultView
- JokeAnswerInputView
Layouts
- JokeLayout
- JokeQuestionLayout
- JokeAnswerLayout
Action (all of these Actions take Joke as input AND output the Joke back)
- GetJokeAnswerFromUser (get an Answer concept from the user and update the Interaction concept)
- ShowJokeQuestionToUser (show the next JokeQuestion to the user)
Other Actions as needed?
通过这种安排,您可以通过笑话概念访问JokeQuestion(s)和JokeAnswer(s)。 JokeResultView将驱动用户在屏幕上看到的内容,您可以在实现中构建某种逻辑来指示Joke等的开始和结束。
试试这个,看看它是否有帮助。