I'm getting a Type mismatch error when using
setFields() on a ContentNode that has an interface field type of
string. Anyone else seeing this?
category = "foo"
show = createObject("RoSGNode", "ShowContentNode")
show.setFields({
category: category
})
print Type(category) ' returns String
print Type(show.category) ' returns roString
Note that this is just a snippet but actually I am using
setFields() because there are several fields I want to set at once. Here is the XML schema for ShowContentNode.
<?xml version="1.0" encoding="utf-8" ?>
<component name="ShowContentNode" extends="EntityContentNode">
<interface>
<field id="showTitle" type="string" />
<field id="path" type="string" />
<field id="category" type="string" />
<field id="urlAlias" type="string" />
<field id="hdposterurl" type="string" />
<field id="sdposterurl" type="string" />
<field id="heroPosterUrl" type="string" />
<field id="tuneIn" type="string" />
<field id="description" type="string" />
</interface>
</component>
What's interesting is that I am able to set the field directly using the dot notation and I do not get the error. e.g:
show.category = category