TypeError: Bad element of type int passed to mxmlChildren at flashx.textLayout.elements::FlowGroupElement/set mxmlChildren
TypeError: Bad element of type int passed to mxmlChildren
at flashx.textLayout.elements::FlowGroupElement/set mxmlChildren()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowGroupElement.as:203]
I using data binding and I passed a integer inside a span tag as shown below. To fix it I had to cast it or convert it to a string.
XML:
-
<s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
-
<s:textFlow>
-
<s:TextFlow>
-
<s:p>
-
<s:a href="http://google.com" color="#ffffff" textDecoration="none"> {data.contentCount} </s:a></s:p>
-
</s:TextFlow>
-
</s:textFlow>
-
</s:RichEditableText>
Correct:
XML:
-
<s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
-
<s:textFlow>
-
<s:TextFlow>
-
<s:p>
-
<s:a href="http://google.com" color="#ffffff" textDecoration="none"> {String(data.contentCount)} </s:a></s:p>
-
</s:TextFlow>
-
</s:textFlow>
-
</s:RichEditableText>
Please post your comments to help future visitors.
No comments yet. Be the first.
Leave a reply
Wrap MXML and ActionScript in [xml] [/xml] and [as] [/as] tags respectively