<MyComp
id="comp"
messages="[hi, hello, world, none]"
/>
Warnings occurred while creating XML component CarouselItem
-- Type mismatch occurred when setting the "messages" field of a "MyComp" node
<MyComp
id="comp"
messages="['hi', 'hello', 'world', 'none']"
/>
"EnTerr" wrote:
Pray tell - what field type would that be? 😎
"TheEndless" wrote:
This this instead...<MyComp
id="comp"
messages="['hi', 'hello', 'world', 'none']"
/>
<MyComp
id="comp"
messages="["hi","hello","world","none"]"
/>
"TheEndless" wrote:"EnTerr" wrote:
Pray tell - what field type would that be? 😎
The OP said he was trying to set the value of a "stringarray" field.
"EnTerr" wrote:
You know what would be awesome-er? If the error message was showing what the expected type was!
I.e. is `messages` declared in <interface/>as "string" or what? (Apparently not string or it wouldn't object)
Welcome to XML world, where we always feed strings to the properties but make-believe they are something else! </sarcasm>
Hi, I have been having a rough time trying to assign a valid value to a stringArray field...
"pixshatterer" wrote:
I already tried, but it didn't work 😕 so I went looking around if escaping quotes would work and it did, so this was the solution:<MyComp
id="comp"
messages="["hi","hello","world","none"]"
/>
... which looks awful, but so far looks like the only way :v
<MyComp
id="comp"
messages='["hi", "hello", "world", "none"]'
/>
"TheEndless" wrote:"pixshatterer" wrote:
I already tried, but it didn't work 😕 so I went looking around if escaping quotes would work and it did, so this was the solution:<MyComp
id="comp"
messages="["hi","hello","world","none"]"
/>
... which looks awful, but so far looks like the only way :v
Eep! Try flipping the quotes...<MyComp
id="comp"
messages='["hi", "hello", "world", "none"]'
/>
XML supports single and double quotes interchangeably when wrapping attribute values. Apparently the Roku SceneGraph parser doesn't...