tiagolr / dconsole

Haxe game-like console that provides runtime acess to methods, variables and more.
MIT License
169 stars 16 forks source link

Enable json on hscript #34

Closed ianharrigan closed 10 years ago

ianharrigan commented 10 years ago

Im trying to run a script that uses json:

var lv = create("listview");
lv.width = 200;
lv.height = 200;
lv.dataSource.add({"text": "Item 1"});

And you get the error "EUnexpected(:)"... This can be fixed by setting "allowJSON" to true, ie:

hScriptParser.allowJSON = true;

in DCCommands.

tiagolr commented 10 years ago

Thanks