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
RowTitleCustom.xml
<?xml version="1.0" encoding="utf-8" ?>
<component name="RowTitleCustom" extends="Group" >
<!-- main handler -->
<interface>
<field id="content" type="node" onChange="onContentChange" />
</interface>
<script type="text/brightscript" uri="pkg:/components/screens/GridScreen/RowTitleCustom.brs" />
<children>
<Label
id="Title"
color="0xF0F0F0"
text=""
/>
<Label
id="Sponsored"
color="0xF0F0F0"
wrap="FALSE"
width="300"
height="0"
lineSpacing="3"
translation="[190,0]" />
<Poster
id="Image"
width="210"
height="30"
translation="[417,0]"/>
</children>
</component>
The image is a small pizza hut logo.