Warnings occurred while creating XML component [name of component]
– Type mismatch occurred when setting the “rowDecorationComponentName” field of a “ZoomRowList” node
at line 99 of file pkg:[path and name of component file].xml
If I set the rowDecorationComponentName property to an array like the following, this warning does not happen. However, the init() function of the rowDecoration component does not get called.
rowDecorationComponentName=‘[“TestTitle”]’
Is there a way to resolve this? Or is the zoomRowList not quite ready for primetime?
The init gets called once. Not every time the component is created. It gets called once at main init. So you set your variables to starting values in this section. Not make dynamic changes. Everything in init is static.
Can you show some of the code and what you are trying to do? Do you have an .xml and .brs for the zoomrowlist? It is hard to see what you are attempting to do.
What is your xml for the row decoration component you are trying to use? If there is a problem there then that won't compile, which will cause it to fail when you try to set the rowdecoration to an errored component name. I can tell you now that this is incorrect rowDecorationComponentName='["CategoryGridRowLabel"]'
It ought to be rowDecorationComponentName="CategoryGridRowLabel"
If your custom decoration component is named CategoryGridRowLabel
Since when does brightscript or XML want those single quotes? Since the 10th of Never.. lol. I think alot of the issues here are probably semantics and syntax issues. If you give us actual code you have we can help you. We wont steal it. Believe me. We have no reason to… lol. Believe me…
But that causes the mismatch warning that I stated in my original post. Through testing, I have found that setting the value to an array does not cause that warning to appear. This is NOT what the documentation recommends to do, so I agree that in normal cases, I should not do that.
Regardless, whether I set the value to a string or an array, the result is the same. The rowDecorationComponent does not instantiate. For example, I set a comment in the component’s init() function and this comment does not show up in the console when I debug.
And the problem there is probably with your decoration component that you haven’t posted for anyone to look at.
If your CategoryGridRowLabel component doesn’t exist, has an error, or another issue which prevents it from compiling then it would be classed as an invalid type, causing a type mismatch. Simply assigning a value ( that is valid ) to a variable wouldn’t cause a type mismatch so that doesn’t prove or disprove anything.
I would guess the component itself would be similar to the one you might use for the custom row title component option which does work, and I tested that one.
Something like this?
RowTitleCustom.brs
'inits grid screen
'creates all children
'sets all observers
Function Init()
m.rowTitleCustom=m.top.findNode("RowTitleCustom")
m.top.observeField("content","onContentChange")
End Function
Sub OnContentChange()
m.top.getChild(0).Text=m.top.content.title
tempX=m.top.getChild(0).translation[0]
tempY=m.top.getChild(0).translation[1]
'Get size of item width and height
tempSizeRect=m.top.getChild(0).boundingRect()
'Determine proper center offset for item
updatedX=tempX+tempSizeRect.width+30
'Set new position of item #2 so it is properly placed using the original Y location
m.top.getChild(1).Translation=[updatedX,tempY]
m.top.getChild(1).Text="SPONSORED BY"
tempX=m.top.getChild(1).translation[0]
'Get size of item width and height
tempSizeRect=m.top.getChild(1).boundingRect()
'Determine proper center offset for item
updatedX=tempX+tempSizeRect.width+30
'Set new position of item #2 so it is properly placed using the original Y location
m.top.getChild(2).Translation=[updatedX,tempY]
m.top.getChild(2).URI="pkg:/images/PHUT.png"
End Sub
For testing purposes, my component was even simpler than that. The XML has no children and the BRS just has an init() function. The mismatch warning still appears.
You are correct - it’s set in the firmware as a non-resizable array with a maximum size of 0. Also it doesn’t appear to display the thumbnails - at least for me HDPosterUrl and SDPosterURL don’t appear with zoomRowList - “[sg.itemscrollerbase.create.fail] Failed to create markup item” - So while you can use it, it doesn’t appear to be fully functional. In order to use rowDecorationComponentName it needs to be a string value, not an array, in the firmware.
I’m able to display thumbnails by setting the itemComponentName.
But it appears there are a few things about ZoomRowList that make it not ready for primetime.
Having already been posted has no relating the mistake It may want to have nevertheless been present formerly and turned into published anyway. Did you check the “monetization” residences for this channel?
itemComponentName working fine but rowDecorationComponentName makes pblm.(normally type mismatch error occur when we put wrong type like string instead of float width=“abc”)
if anyone got the solution pls post a sample code.