Forum Discussion
greno
15 years agoVisitor
OK, I have this sort of working. Now I'm stuck on understating how these roInput events are queued up.
I'm using the audioapp example as a starting point. Here is what I want:
- Screen A = Main roPosterScreen screen
- Screen B = roAudioPlayer screen
- Screen C = not sure yet
If I get any external command (roInput), it shouldn't matter where in the channel I am - i want it to go to the appropriate screen and process it. I've added roInput to the message loop of all the screens so they can all receive roInput events. If I get external message type "B", it should play in Screen B. If I get message type "C", it should play in Screen C.
Here is what is working:
- Start at Screen A
- Send external command type "B"
- Screen B is displayed and starts playing the delivered media from passed URL
- Send another external command type "B"
- Screen B knows to stay on same screen, stop playing old content, start playing new content from message B
This works fine, but at this point if I hit the up/back key, Screen A now processes my second external command type "B", even though screen B already processed it. The effect is it launches screen B again and plays the content again from the second external command.
So the question is, how can I make sure only one of these external messages is processed instead of both screen A and B message loops getting it?
This also raises another question about how I should handle message type "C" while in screen B? Should it just return to Screen A and let it handle it, or should it launch screen C? And when in screen C, I want the up/return key to go to the top level Screen A, and not retain a history of it's path through screen B.
Hope that makes sense! Any suggestions would be appreciated.
Thanks
-Gregg
I'm using the audioapp example as a starting point. Here is what I want:
- Screen A = Main roPosterScreen screen
- Screen B = roAudioPlayer screen
- Screen C = not sure yet
If I get any external command (roInput), it shouldn't matter where in the channel I am - i want it to go to the appropriate screen and process it. I've added roInput to the message loop of all the screens so they can all receive roInput events. If I get external message type "B", it should play in Screen B. If I get message type "C", it should play in Screen C.
Here is what is working:
- Start at Screen A
- Send external command type "B"
- Screen B is displayed and starts playing the delivered media from passed URL
- Send another external command type "B"
- Screen B knows to stay on same screen, stop playing old content, start playing new content from message B
This works fine, but at this point if I hit the up/back key, Screen A now processes my second external command type "B", even though screen B already processed it. The effect is it launches screen B again and plays the content again from the second external command.
So the question is, how can I make sure only one of these external messages is processed instead of both screen A and B message loops getting it?
This also raises another question about how I should handle message type "C" while in screen B? Should it just return to Screen A and let it handle it, or should it launch screen C? And when in screen C, I want the up/return key to go to the top level Screen A, and not retain a history of it's path through screen B.
Hope that makes sense! Any suggestions would be appreciated.
Thanks
-Gregg