0

I want to listen for event when the item is selected from the PosterGrid here is my XML element posterGrid

 <PosterGrid 
            id = "videosGrid" 
            basePosterSize = "[ 312, 188 ]" 
            caption1NumLines = "1" 
            numColumns = "3" 
            numRows = "5" 
            itemSpacing = "[ 20, 25 ]" 
            translation = "[ 100, 200]"
          />

I have implemented a observer when Item is selected like this

m.videosGrid = m.top.findNode("videosGrid")

m.videosGrid.observeField("itemSelected", "playVideo")

this is successfully calling when specific video is selected, but I want to listen from the main thread, this is a specific videoScreen thread, I am opening this videoScreen from this code

sub ShowVideoGridScreen()
m.VideosGridScreen = CreateObject("roSGNode", "VideosScreen")
m.VideosGridScreen.ObserveField("selectedPosterIndex", "OnGridScreenItemSelected") observe postergrid field, when item is selected 
ShowScreen(m.VideosGridScreen) ' show GridScreen
end sub

sub OnVideoGridScreenItemSelected() ' invoked when GridScreen item is selected
    print "------- Video Item Is Selected -----------"
    ShowVideoScreen()
end sub

I want to listen here for event and show videoScreen to play video as I have displayed the grid screen. This is the code which is in the ShowVideoScreen() function to open the playVideo thread. Can't understand this, please let me know if you know something about that, or any resource where can I find these things. Thanks in advance.

0 Answers0