EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016
02:49 AM
RSG: Buggy <field value="..."/> parser
"So you think you know Roku xmlography?"
Here is a challenge - try to guess which of the following will work and which will cause an error, you will be surprised:
Explanation: the "value" attribute evaluator apparently is very fickle. It's neither parseJSON() nor the B/S eval(), it's... something else. Something half-whipped, half-baked. All of the above should be working. Four out of eight don't.
[spoiler=answers:1axij624]
Here is a challenge - try to guess which of the following will work and which will cause an error, you will be surprised:
<interface>
<field id="a" type="assocarray" value = ""/>
<field id="b" type="assocarray" value="invalid"/> -->
<field id="c" type="assocarray" value ='{ }'/>
<field id="d" type="assocarray" value='{a: 2}'/> -->
<field id="e" type="assocarray" value='{a :"7"} '/> -->
<field id="f" type="assocarray" value='{" ":7}'/> -->
<field id="g" type="assocarray" value='{ a: [ 1]}'/>
<field id="h" type="assocarray" value=' {a: {b:"0" } } '/>
</interface>
Explanation: the "value" attribute evaluator apparently is very fickle. It's neither parseJSON() nor the B/S eval(), it's... something else. Something half-whipped, half-baked. All of the above should be working. Four out of eight don't.
[spoiler=answers:1axij624]
Error creating XML component:[/spoiler:1axij624]
-- Cannot convert initial value string "invalid" to field type assocarray for interface field "b"
...
-- Cannot convert initial value string "{a: 2}" to field type assocarray for interface field "d"
...
-- Cannot convert initial value string "{a :"7"} " to field type assocarray for interface field "e"
...
-- Cannot convert initial value string "{" ":7}" to field type assocarray for interface field "f"
3 REPLIES 3
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2016
01:12 PM
Re: RSG: Buggy <field value="..."/> parser
@Roku - can i haz bug filed on this one, please?
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2016
04:33 PM
Re: RSG: Buggy <field value="..."/> parser
bump
adrianc1982
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2016
10:38 PM
Re: RSG: Buggy <field value="..."/> parser
i hope something gets done for roassociative arrays in RSG
Also please add multidimensional roassociative arrays!!
Also please add multidimensional roassociative arrays!!