retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2010
11:44 AM
roGridScreen msg.isListItemFocused bug?
I've noticed another issue. Sometimes (quite often actually) the roGridScreenEvent message is returning incorrect values for the selected row/column. When checking msg.isListItemFocused, the msg.GetData() (column) value is "8801162" and/or the msg.GetIndex() (row) value "65536". I'm not entirely sure how/when it's happening -- but it's happening before the isListItemSelected event. Sometimes the row value is right and the column value is wrong -- sometimes they're both off. Attempting to use these values in conjunction with a backing store is problematic. For now, I'm putting in sanity checks. Has anyone else experienced this issue yet?
4 REPLIES 4


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2010
12:28 PM
Re: roGridScreen msg.isListItemFocused bug?
I saw something like this a while back, but it turned out to be an issue with my code and not the grid screen. I can't remember what the problem was off the top of my head. If I come across the answer, I will post it here.
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2010
01:20 PM
Re: roGridScreen msg.isListItemFocused bug?
"RokuChris" wrote:
I saw something like this a while back, but it turned out to be an issue with my code and not the grid screen. I can't remember what the problem was off the top of my head. If I come across the answer, I will post it here.
I think I figured it out. The focused event is getting fired every time I select something. So it's like it fires focus and then select events when I press the button. The row/column values are wrong for the focus event and right for the selection event. Not sure what to do about that...other than to check for selection before focusing.
I have (pseudo-code):
if focused then
...
else if selected then
...
end if
when it might work better if I have this:
if selected then
...
else if focused then
...
end if
retrotom
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2010
01:24 PM
Re: roGridScreen msg.isListItemFocused bug?
That doesn't work. I'm seeing two distinct events. Not sure what to do about it other than my sanity check.
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2010
11:46 PM
Re: roGridScreen msg.isListItemFocused bug?
I ran into the same thing when I was iterating over all the rows and setting the focused item to the first one. I'd occasionally get a focused event with a row index of one more than should have been possible and a column that made no sense whatsoever - probably 8801162. I just added the sanity check and forgot about it.
-JT
-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.