Hi there. I'm very new to Roku development. I'm working on trying to get an overlay to display on the screen. I have some legacy code that I'm trying to move from one file to another. General algorithm in english:
1. when there's more than one channel
2. and a user presses left or right button
3. show the channel bar
4. load the channel bar information
so far, we're good through #2.
#2 calls a function:
showOverlay("channel bar")
and the function:
Function showOverlay(overlayType as string)
InitOverlay()
if overlayType = "channel bar" then show_channel_bar()
End Function
Sub show_channel_bar()
if m.channelManager.liveChannels.Count() > 1 then
print "show_channel_bar()"
m.canvas.AllowUpdates(false)
m.updateChannelBar()
m.canvas.Show()
m.canvas.AllowUpdates(true)
m.channelBarActive = true
end if
End Sub
The debugger is showing this error, however...
OverlayController.brs(44): runtime error f3: Interface not a member of BrightScript Component
044: m.canvas.AllowUpdates(false)
What am I missing here? FWIW, this same code works when in a different file. we're looking to abstract it a bit and allow multiple types of overlays.
Thanks!