Good day to everyone...
Being disabled and ill is not a condition that helps, especially when you have to deliver a TV app within a few days for one of the largest radio stations in the world.
That said, if anyone can give me a hand...
In the following code, at some point I delete the last cell of the first row in the GridView...
Unfortunately, it doesn’t work. The second cell of the first row is still selectable...
I don’t know. Help!
if trovato$ = ""
contentNode = m.top.content
if contentNode <> invalid
riga = contentNode.GetChild(0)
if riga <> invalid
numero = riga.getChildCount()
if numero = 2
riga.RemoveChild(1)
end if
end if
contentNode.Update({ children: riga })
end if
m.top.content = contentNode
end if
' set up a root ContentNode to represent rowList on the GridScreen
contentNode = m.top.content
if contentNode = invalid
contentNode = CreateObject("roSGNode", "ContentNode")
end if
contentNode.Update({
children: rootChildren
}, true)
' populate content field with root content node.
' Observer(see OnMainContentLoaded in MainScene.brs) is invoked at that moment
m.top.content = contentNode
Basically, the gridview is displayed with two cells in the first row. However, in debug, you can see that it's actually only one...
Am I forgetting to do something?"
0 pkg:/source/main.brs(52) msg = wait(0, m.port)
1* ...asks/MainContentTaskLogic.brs(21) STOP
2[u] ??
*selected [u]unattached(not debuggable)
Brightscript Debugger> t
022: content = m.mainContentTask.content
Brightscript Debugger> t
023: if content <> invalid and content.count() > 1 then
Brightscript Debugger> t
024: ilfiglio = content.GetChildren(1,0)
Brightscript Debugger> t
025: ifiglidelfiglio = content.GetChildren(1,0)
Thread selected: 1* ...asks/MainContentTaskLogic.brs(25) ifiglidelfiglio = content.GetChildren(1,0)
Brightscript Debugger> t
026: ilfigliodelfiglio = ifiglidelfiglio[0]
Brightscript Debugger> p ilfigliodelfiglio
<Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: "live"
description: ""
title: ""
}
Brightscript Debugger> p ifiglidelfiglio[1]
invalid
Brightscript Debugger>
Basically, the gridview is displayed with two cells in the first row. However, in debug, you can see that it's actually only one...
Am I forgetting to do something?"
0 pkg:/source/main.brs(52) msg = wait(0, m.port)
1* ...asks/MainContentTaskLogic.brs(21) STOP
2[u] ??
*selected [u]unattached(not debuggable)
Brightscript Debugger> t
022: content = m.mainContentTask.content
Brightscript Debugger> t
023: if content <> invalid and content.count() > 1 then
Brightscript Debugger> t
024: ilfiglio = content.GetChildren(1,0)
Brightscript Debugger> t
025: ifiglidelfiglio = content.GetChildren(1,0)
Thread selected: 1* ...asks/MainContentTaskLogic.brs(25) ifiglidelfiglio = content.GetChildren(1,0)
Brightscript Debugger> t
026: ilfigliodelfiglio = ifiglidelfiglio[0]
Brightscript Debugger> p ilfigliodelfiglio
<Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: "live"
description: ""
title: ""
}
Brightscript Debugger> p ifiglidelfiglio[1]
invalid
Brightscript Debugger>
The root cause of my problems is the lack of time. The app (or channel) was created by a colleague of mine who is no longer here, and I found myself managing 5 apps (Android TV, Android Mobile, Apple Mobile, Apple TV, Amazon Firestick) and also the Roku channel...
In the end, with patience and using some of my free time, I managed to understand how to use roAssociativeArray and roArray.
Anyway, I solved it.
Next time, try asking this in our Roku Community slack channel:
https://rokucommunity.github.io/