dragonfly77
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2013
03:23 AM
Help on Grid Screen Menu
A little help please, im pulling my hair on this, i know its just simple, but ive already spent 4 hours trying to figure it out.
I basically am trying to modify the screen grid style menu that is posted here : http://blog.roku.com/developer/2012/08/09/getting-started-with-brightscript-screen-navigation/
I do get the part where it shows the different rows by these two lines below
and that it calls these two Functions to display the two categories on the screen (ive removed some of the items just for clarity:
What i dont get is how to return the specific Title or Description that was chosen from the Grid Menu when the "ShowLunchItemDetails(msg.GetIndex())" is called.
I did a telnet on the Roku and that i can see it only either prints zero(0) as the value of the index if any of the items in the first top row is selected (either Fruits or Salad) and it returns one(1) if either American Burger or Spaghetti is chosen.
How can i return the title of the chosen menu?
Im sorry if this a newbie question.. a little help please..
I basically am trying to modify the screen grid style menu that is posted here : http://blog.roku.com/developer/2012/08/09/getting-started-with-brightscript-screen-navigation/
I do get the part where it shows the different rows by these two lines below
screen.SetContentList(0,GetLunchMenuOptions_Healthy())
screen.SetContentList(1,GetLunchMenuOptions_Tasty())
and that it calls these two Functions to display the two categories on the screen (ive removed some of the items just for clarity:
Function GetLunchMenuOptions_Healthy() as object
m.options = [
{ Title: "Fruit"
Description: "A Variety of Fresh Fruit"
}
{ Title: "Salad"
Description: "Straight from Local Growers"
]
return m.options
End Function
Function GetLunchMenuOptions_Tasty() as object
m.options = [
{ Title: "American Burger"
Description: "Tasty Burger"
}
{ Title: "Spaghetti"
Description: "Red"
}
]
return m.options
End Function
What i dont get is how to return the specific Title or Description that was chosen from the Grid Menu when the "ShowLunchItemDetails(msg.GetIndex())" is called.
I did a telnet on the Roku and that i can see it only either prints zero(0) as the value of the index if any of the items in the first top row is selected (either Fruits or Salad) and it returns one(1) if either American Burger or Spaghetti is chosen.
How can i return the title of the chosen menu?
ShowLunchItemDetails( msg.GetIndex() )
Function ShowLunchItemDetails(index as integer) as integer
print "Selected Index: " + Stri(index)
print "Description: " + m.options[index].Description
End Function
Im sorry if this a newbie question.. a little help please..
1 REPLY 1

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2013
07:36 AM
Re: Help on Grid Screen Menu
See http://sdkdocs.roku.com/display/sdkdoc/ ... creenEvent.
GetIndex returns the row, GetData returns the column.
--Mark
GetIndex returns the row, GetData returns the column.
--Mark