printing row item size from variable
item size is <Component: roArray> =
[
264
110
]
item size is <Component: roArray> =
[
264
149
]
item size is <Component: roArray> =
[
165
247
]
item size is <Component: roArray> =
[
264
149
]
item size is <Component: roArray> =
[
264
149
]
item size is <Component: roArray> =
[
264
149
]
item size is <Component: roArray> =
[
165
247
]
item size is <Component: roArray> =
[
165
247
]
item size is <Component: roArray> =
[
165
247
]
item size is <Component: roArray> =
[
264
149
]
printing rowList rowItemSize attribute
<Component: roArray> =
[
264
149
]
"dacian_roman23" wrote:
I still have a problem with the rowItemSize attribute of the row list component even after the upgrade. Current version is 7.2.0 build 4091-04. The row list attributes like this one (rowItemSize) can only be set in the script that is used for my component ? I'm not able to override them in the main thread. I am creating the component and after that I want to set the attributes and it's not working
"EnTerr" wrote:"dacian_roman23" wrote:
I still have a problem with the rowItemSize attribute of the row list component even after the upgrade. Current version is 7.2.0 build 4091-04. The row list attributes like this one (rowItemSize) can only be set in the script that is used for my component ? I'm not able to override them in the main thread. I am creating the component and after that I want to set the attributes and it's not working
I am having really hard time trying to understand your example. Case might be something i am interested in but IDK.
Can you give very specific example "when i do this - it works" vs "when i do that - it doesn't" - and also put them in [ code] [/code] brackets?
function init()
componentsName = getComponentsNameConstants()
m.rowGridConfig = getRowGridConfig()
m.top.visible = false
m.top.itemComponentName = componentsName.SG_ROW_LIST_ITEM
m.top.translation = m.rowGridConfig.TRANSLATION
m.top.itemSize = m.rowGridConfig.ITEM_SIZE
m.top.itemSpacing = m.rowGridConfig.ITEM_SPACING
m.top.showRowLabel = true
m.top.rowLabelFont = getFontForRowHeader()
m.top.rowLabelColor = m.rowGridConfig.WHITE_COLOR
m.top.rowLabelOffset = m.rowGridConfig.ROW_LABEL_OFFSET
m.top.rowHeights = m.rowGridConfig.ROW_HEIGHTS
m.top.rowItemSize = m.rowGridConfig.ROW_ITEM_SIZE
m.top.rowSpacings = m.rowGridConfig.ROW_SPACINGS
m.top.rowItemSpacing = m.rowGridConfig.ROW_ITEM_SPACING
m.top.rowFocusAnimationStyle = "fixedFocusWrap"
m.top.focusXOffset = [0.0]'
end function
m.homeScreenRowList = m.app.mainScene.createChild(componentsName.SG_ROW_LIST_GRID) ' this is my component that extends the row list component, and please note that this triggers the init function mentioned above
m.homeScreenRowList.id = componentsName.SG_HOMESCREEN
m.homeScreenRowList.rowItemSize = getRowDimensions(m.response, true , sgConfig.ROW_MENU_ITEM_SIZE) 'this function returns an array with arrays with the dimensions needed
m.homeScreenRowList.showRowLabel = [false, true]
m.homeScreenRowList.rowSpacings = [sgConfig.ROW_MENU_MARGIN_BOTTOM] 'just a constant value
m.homeScreenRowList.rowHeights = getRowDimensions(m.response, false , sgConfig.ROW_MENU_ITEM_SIZE[1]) 'returning an array with heights for the rowHeights attribute
sgConfig = getRowGridConfig()
rowItemSize = getRowDimensions(m.response, true , sgConfig.ROW_MENU_ITEM_SIZE)
componentsName = getComponentsNameConstants()
m.homeScreenRowList = m.app.mainScene.createChild(componentsName.SG_ROW_LIST_GRID)
print "printing rowItemSize variable"
print rowItemSize
print "-----------------------------"
print "printing rowItemSize values"
for each itemSize in rowItemSize
print itemSize
end for
stop
m.homeScreenRowList.rowItemSize = []
m.homeScreenRowList.rowItemSize = rowItemSize
stop
printing rowItemSize variable
<Component: roArray> =
[
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
]
-----------------------------
printing rowItemSize values
<Component: roArray> =
[
264
110
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
264
149
]
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
Current Function:
070: print "-----------------------------"
071:
072: print "printing rowItemSize values"
073:
074: for each itemSize in rowItemSize
075: print itemSize
076: end for
077:
078:* stop
079: m.homeScreenRowList.rowItemSize = []
080: m.homeScreenRowList.rowItemSize = rowItemSize
081: stop
082:
STOP (runtime error &hf7) in pkg:/source/appHome.brs(78)
078: stop
Backtrace:
#5 Function homescreen_handlefetchsuccess() As Dynamic
file/line: pkg:/source/appHome.brs(79)
#4 Function homescreen_populatescreen() As Dynamic
file/line: pkg:/source/appHome.brs(47)
#3 Function homescreen_show() As Dynamic
file/line: pkg:/source/appHome.brs(36)
#2 Function app_showhomescreen() As Dynamic
file/line: pkg:/source/app.brs(95)
#1 Function app_show(startingpage As Object) As Void
file/line: pkg:/source/app.brs(87)
#0 Function runuserinterface(ecp As Dynamic) As Dynamic
file/line: pkg:/source/main.brs(22)
Local Variables:
global rotINTERFACE:ifGlobal
m roAssociativeArray refcnt=7 count:16
sgconfig roAssociativeArray refcnt=1 count:37
rowitemsize roArray refcnt=1 count:10
componentsname roAssociativeArray refcnt=1 count:17
itemsize roArray refcnt=6 count:2
BrightScript Debugger> ? m.homeScreenRowList.rowItemSize
<Component: roArray> =
[
<Component: roArray>
]
BrightScript Debugger> ? m.homeScreenRowList.rowItemSize[0] --- this is the default value that was set in the init function
<Component: roArray> =
[
264
149
]
BrightScript Debugger> s
079: m.homeScreenRowList.rowItemSize = []
BrightScript Debugger> ? m.homescreenrowlist.rowItemSize -- so far, so good .. i have changed the rowItemSize attribute to an empty array
<Component: roArray> =
[
]
BrightScript Debugger> ? rowItemSize -- checking my rowItemSize variable again
<Component: roArray> =
[
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
]
BrightScript Debugger> s
080: m.homeScreenRowList.rowItemSize = rowItemSize -- setting the rowItemSize attribute again
BrightScript Debugger> ? m.homeScreenRowList.rowItemSize
<Component: roArray> =
[
] ---- i should see the values printed above, right ? 😞 😞
Here is the different output - using 7.1 firmware - but the same code
===================================================
printing rowItemSize variable
<Component: roArray> =
[
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
]
-----------------------------
printing rowItemSize values
<Component: roArray> =
[
264
110
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
264
149
]
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
Current Function:
072:
073: print "printing rowItemSize values"
074:
075: for each itemSize in rowItemSize
076: print itemSize
077: end for
078:
079:
080:* stop
081: m.homeScreenRowList.rowItemSize = []
082: m.homeScreenRowList.rowItemSize = rowItemSize
083: stop
084:
STOP (runtime error &hf7) in pkg:/source/appHome.brs(80)
080: stop
Backtrace:
#5 Function homescreen_handlefetchsuccess() As Dynamic
file/line: pkg:/source/appHome.brs(81)
#4 Function homescreen_populatescreen() As Dynamic
file/line: pkg:/source/appHome.brs(47)
#3 Function homescreen_show() As Dynamic
file/line: pkg:/source/appHome.brs(36)
#2 Function app_showhomescreen() As Dynamic
file/line: pkg:/source/app.brs(95)
#1 Function app_show(startingpage As Object) As Void
file/line: pkg:/source/app.brs(87)
#0 Function runuserinterface(ecp As Dynamic) As Dynamic
file/line: pkg:/source/main.brs(22)
Local Variables:
global rotINTERFACE:ifGlobal
m roAssociativeArray refcnt=7 count:16
sgconfig roAssociativeArray refcnt=1 count:37
rowitemsize roArray refcnt=1 count:11
componentsname roAssociativeArray refcnt=1 count:17
itemsize roArray refcnt=7 count:2
BrightScript Debugger> s
081: m.homeScreenRowList.rowItemSize = []
BrightScript Debugger> ? m.homeScreenRowList.rowItemSize
<Component: roArray> =
[
]
BrightScript Debugger> s
082: m.homeScreenRowList.rowItemSize = rowItemSize
BrightScript Debugger> ? m.homeScreenRowList.rowItemSize
<Component: roArray> =
[
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
]
BrightScript Debugger>
"dacian_roman23" wrote:
Can anyone help me with a simple rowList example in 7.2 firmware version where rowItemSize attribute is changed dynamically in the main thread ?
"EnTerr" wrote:"dacian_roman23" wrote:
Can anyone help me with a simple rowList example in 7.2 firmware version where rowItemSize attribute is changed dynamically in the main thread ?
Somebody from the small hired army of "evangelists" should be able to help you (where are they when you need one?!).
In the mean time, do these two help?
viewtopic.php?f=34&t=95504
viewtopic.php?f=34&t=95416
<Component: roArray> =
[
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
<Component: roArray>
]
roArray
<Component: roArray> =
[
264
110
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
264
149
]
----------------------------------
=================================================================
Warning occurred while setting a field of an RoSGNode
-- Type mismatch occurred when setting the "rowitemsize" field of a "RowList" node
at line 75 of file pkg:/components/RowList/RowList.brs
=================================================================