sciter-sdk / Sciter-Dport

Port of Sciter headers for the D language
https://sciter.com
MIT License
33 stars 3 forks source link

HashMap Problem #2

Closed zek closed 9 years ago

zek commented 9 years ago

I've called function with view.function(1, 2, 3, 4, 5, "zack", {'a': 'b', 't': 'q'}, [123,456]);

then catched it like this: foreach(i, param; prms.argv[0..prms.argc]){ writeln(i, ": ", json_value(param).to_string()); } but output is wrong 0: 1 1: 2 2: 3 3: 4 4: 5 5: "zack" 6: { "" :98} 7: [123, 456]

It fails only hashmaps.

zek commented 9 years ago

Yes. I've called it from html page then catched it with native event handler. Any type of data works fine except objects (hashmaps)

c-smile commented 9 years ago

In TIScript 'a' is an integer literal - unicode code point of 'a'. In the same way as in C/C++ and D. To drtzack: you should use strings: {"a": "b", "t": "q"} there.