calvaryftl
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2012
07:45 AM
Stops responding after returning to previous screen
I am developing a channel, using the roListScreen component. I find that when I go down one level, then use the back arrow to return to the previous screen, the system no longer responds to my button press when I attempt to go back down to the next screen again. I can continue to go up the stack, but not down. This happens on levels 1, 2, and 3. I can go down, and back up, but never down again unless I exit and come back in.
Can anyone offer insight on what I might be doing wrong here?
I am using the same code in each function, so I am wondering if there might be some sort of variable scope conflict happening. However, it is my understanding that the variables within a function are scoped to that function, so I don't see how that could be the problem.
Do I need to use unique names in each function?
They all currently look like this:
If anyone can offer some guidance here, I'd appreciate it.
Thank you,
Kenny
Can anyone offer insight on what I might be doing wrong here?
I am using the same code in each function, so I am wondering if there might be some sort of variable scope conflict happening. However, it is my understanding that the variables within a function are scoped to that function, so I don't see how that could be the problem.
Do I need to use unique names in each function?
They all currently look like this:
screen = CreateObject("roListScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
.
.
.
If anyone can offer some guidance here, I'd appreciate it.
Thank you,
Kenny
3 REPLIES 3


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2012
08:56 AM
Re: Stops responding after returning to previous screen
Variables are local to the function they're declared in. You do not need to use unique variable names across multiple functions.
The channel could be crashing. Check the debug console for clues.
It could also be that you're getting stuck in the second screen's event loop somehow, so events raised by the first screen are being caught by the wrong event loop.
The channel could be crashing. Check the debug console for clues.
It could also be that you're getting stuck in the second screen's event loop somehow, so events raised by the first screen are being caught by the wrong event loop.
calvaryftl
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2012
09:04 AM
Re: Stops responding after returning to previous screen
It's not showing any debug info when it stops replying, but I think you might be on to something with the event loop. I'll double check that section of code.
Thank you for the reply! 🙂
Kenny
Thank you for the reply! 🙂
Kenny
calvaryftl
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2012
09:17 AM
SOLVED Re: Stops responding after returning to previous scre
Found it!
I left off:
The wait loop never exited because of that. :?
I left off:
if (msg.isScreenClosed()) then
return -1
else
The wait loop never exited because of that. :?