Closed MarkusBauer closed 2 years ago
Currently boolean values are created by sciter.NewValue as T_INT, while sciter has T_BOOL for this. In Javascript, values are therefore represented as 1 and 0 instead of true and false. The code to properly set booleans is already present.
sciter.NewValue
T_INT
T_BOOL
The bug can be reproduced by this code:
v0 := sciter.NewValue(false) println(v0.IsBool(), v0.Bool(), v0.IsInt()) v1 := sciter.NewValue(true) println(v1.IsBool(), v1.Bool(), v1.IsInt())
The expected output should be `true false false / true true false, but is false false true / false true true.
`true false false / true true false
false false true / false true true
Currently boolean values are created by
sciter.NewValue
asT_INT
, while sciter hasT_BOOL
for this. In Javascript, values are therefore represented as 1 and 0 instead of true and false. The code to properly set booleans is already present.The bug can be reproduced by this code:
The expected output should be
`true false false / true true false
, but isfalse false true / false true true
.