renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2010
02:16 PM
Hierarchy of Poster screens
I'm trying to implement a hierarchy of Poster screens similar to the blip.tv channel. The problem I'm having is that as far as I can tell, pressing the Up button or the Home button on the remote both generate an isScreenClosed event with no way to discern which button was pressed. If I navigate down into my hierarchy and then press the Home button, the Roku wants to jump to the home screen, but I can't tell the difference between that and the user pressing the Up button. Is there someplace that the hierarchy gets spelled out that I'm missing?
Thanks,
-JT
Thanks,
-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.
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.
4 REPLIES 4
EngoTom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2010
02:45 PM
Re: Hierarchy of Poster screens
Have you tried msg.isRemoteKeyPressed()
Here is some code from my springboard for left and right but not up or home. Worth checkng out thoough...
else if msg.isRemoteKeyPressed()
if msg.GetIndex() = remoteLeft then
'do something
endif
if msg.GetIndex() = remoteRight then
'do something
endif
else
Here is some code from my springboard for left and right but not up or home. Worth checkng out thoough...
else if msg.isRemoteKeyPressed()
if msg.GetIndex() = remoteLeft then
'do something
endif
if msg.GetIndex() = remoteRight then
'do something
endif
else
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2010
09:54 PM
Re: Hierarchy of Poster screens
Thanks for the suggestion, but it appears that isn't implemented for Poster screens. I put
-JT
msg = wait(0, screen.GetMessagePort())in my event handler for the Poster screen and it never hits the stop. I have to be missing something simple. I'm going to try to modify the 'simpleposter' example to add another layer to the hierarchy to see if there's something wrong with my code, but I'm not hopeful. Anyone have the source code for the blip.tv channel? 😄
if msg.isRemoteKeyPressed() then stop
-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.
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.
TommyTheKid
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2010
11:20 PM
Re: Hierarchy of Poster screens
I am fairly sure that, no matter where you are in your application, the "HOME" button on the remote will exit your channel. This is by design. I don't think you can use the "home" button (for example to go back to the home screen of your channel). However, up should work. UP generally "exits" the last screen, so just create a new roPosterScreen object each time they select something, then when they press up (close) that screen, it will be back on the previous one. (just an idea?)
Tommy
Tommy
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2010
01:55 AM
Re: Hierarchy of Poster screens
Tommy,
You got it. I should have returned here earlier, I could have saved a few hours. It only took all day for it to dawn on me. You have to create new screens as you navigate down your hierarchy and keep track of them in an array or whatever. When the Up button is pushed, you'll get the isScreenClosed as the current screen is closed. Pop that one off your stack and call the .Show() function for the previous one in the stack. The Home button will produce isScreenClosed messages for all of the screens in your stack. When you get the isScreenClosed message for the top level screen you can exit gracefully.
I might suggest to Roku that the simpleposter example be made slightly more complex to illustrate this. Maybe I'm just getting stupid in my old age, but this literally took me a day to figure out.
Thanks for everyone's responses.
-JT
You got it. I should have returned here earlier, I could have saved a few hours. It only took all day for it to dawn on me. You have to create new screens as you navigate down your hierarchy and keep track of them in an array or whatever. When the Up button is pushed, you'll get the isScreenClosed as the current screen is closed. Pop that one off your stack and call the .Show() function for the previous one in the stack. The Home button will produce isScreenClosed messages for all of the screens in your stack. When you get the isScreenClosed message for the top level screen you can exit gracefully.
I might suggest to Roku that the simpleposter example be made slightly more complex to illustrate this. Maybe I'm just getting stupid in my old age, but this literally took me a day to figure out.
Thanks for everyone's responses.
-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.
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.