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
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..