screen.show()stacking one screen on top of the other one. However, I am not sure what to do with a compositor. Do I create a new screen object and pass it to a compositor ? or just clear the screen somehow and draw the next one ?
if l_index = m.Channel.kp_OK
m.Channel.Screen = Invalid
m.Channel.Clear()
m.Channel = Invalid
port = CreateObject("roMessagePort")
screen = CreateObject("roSearchScreen")
screen.SetMessagePort(port)
screen.Show()
print "Waiting for a message from the screen..."
' search screen main event loop
done = false
while done = false
msg = wait(0, screen.GetMessagePort())
if type(msg) = "roSearchScreenEvent"
if msg.isScreenClosed()
print "screen closed"
screen.Close()
done = true
else if msg.isCleared()
print "search terms cleared"
history.Clear()
else if msg.isPartialResult()
print "partial search: "; msg.GetMessage()
if not displayHistory
screen.SetSearchTerms((msg.GetMessage()))
endif
else if msg.isFullResult()
print "full search: "; msg.GetMessage()
history.Push(msg.GetMessage())
if displayHistory
screen.AddSearchTerm(msg.GetMessage())
end if
else
print "Unknown event: "; msg.GetType(); " msg: ";sg.GetMessage()
endif
endif
endwhile
m.Channel = NewChannel()
m.Channel.Initialize()
m.Channel.Compositor.SetDrawTo( m.Channel.Screen, m.Channel.ScrBkgClr )
VirtualGridTest()
Type Mismatch. (runtime error &h18) in pkg:/source/main.brs(1702)
1702: Function GetVCBitmaps(number As Integer, row As String, width As Integer, height As Integer) As Object
Backtrace:
#4 Function getvcbitmaps(number As Integer, row As String, width As Integer, height As Integer) As Object
file/line: pkg:/source/main.brs(1702)
#3 Function virtualgridtest() As Void
file/line: pkg:/source/main.brs(256)
#2 Function virtual_grid_eventloop() As Integer
file/line: pkg:/source/main.brs(1120)
#1 Function virtualgridtest() As Void
file/line: pkg:/source/main.brs(276)
#0 Function main() As Void
file/line: pkg:/source/main.brs(14)
Local Variables:
number Integer val:10
row roString (2.1 was String) refcnt=1 val:"A"
width Invalid
height Invalid
global rotINTERFACE:ifGlobal
m roAssociativeArray refcnt=5 count:1
CellWidth = m.Channel.CELL_WIDTH
CellHeight = m.Channel.CELL_HEIGHT
nc.CELL_WIDTH = 240
nc.CELL_HEIGHT = 327
m.Channel = NewChannel()
m.Channel.Initialize()
m.Channel.Compositor.SetDrawTo( m.Channel.Screen, m.Channel.ScrBkgClr )
VirtualGridTest()
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!