content: ' entry point of GridScreen
  sub Init()
      m.rowList = m.top.FindNode("rowList")
      m.rowList.SetFocus(true)
      ' label with item description
      m.descriptionLabel = m.top.FindNode("descriptionLabel")
      ' observe visible field so we can see GridScreen change visibility
      m.top.ObserveField("visible", "OnVisibleChange")
      ' label with item title
      m.titleLabel = m.top.FindNode("titleLabel")
      ' observe rowItemFocused so we can know when another item of rowList will be focused
      m.rowList.ObserveField("rowItemFocused", "OnItemFocused")
  end sub
  
  sub OnVisibleChange()
      if m.top.visible = true
          m.RowList.SetFocus(true) ' set focus to RowList if GridScreen is visible
      end if
  end sub
  
  sub OnItemFocused() ' invoked when another item is focused item
      focusedIndex = m.rowList.rowItemFocused ' get position of focused item
      row = m.rowList.content.GetChild(focusedIndex[0]) ' get all items of row
      item = row.GetChild(focusedIndex[1]) ' get focused item
      ' update description label with description of focused item
      m.descriptionLabel.text = item.description
      ' update title label with title of focused item
      m.titleLabel.text = item.title
      ' adding length of playback to the title if item length field was populated
      if item.length <> invalid
          m.titleLabel.text += " | " + GetTime(item.length)
      end if
  end sub
  
  ' this methos convert seconds to mm:ss format
  ' getTime(138) returns 2:18
  function GetTime(length as Integer) as String
      minutes = (length \ 60).ToStr()
      seconds = length MOD 60
      if seconds < 10
          seconds = "0" + seconds.ToStr()
      else
          seconds = seconds.ToStr()
      end if
      return minutes + ":" + seconds
  end function