Re: [SailfishDevel] Javascript Object problem

2015-03-21 Thread Andrey Kozhevnikov
this solution is acceptable for me and works fine, thank you! 21.03.2015 15:38, jklingen пишет: Hi Andrey, this works as expected when prefixing the object key with a character, e.g. temp["id-" + objid.text]= {"case": "test"} My assumption is that at some point the key is implicitely conv

Re: [SailfishDevel] Javascript Object problem

2015-03-21 Thread jklingen
Hi Andrey, this works as expected when prefixing the object key with a character, e.g. temp["id-" + objid.text]= {"case": "test"} My assumption is that at some point the key is implicitely converted to a number, and your object ends up as array, causing strange things when indexes are getti

Re: [SailfishDevel] Javascript Object problem

2015-03-20 Thread Andrey Kozhevnikov
Sorry, you understand my problem totally wrong. 20.03.2015 16:55, Luis Manuel Ramos Da Costa пишет: I don't know if this can help, but Javascript and QML work in separate process, and because of this any variable change on JS to be read in QML (or vice-versa) should be readed using a onXXXChang

Re: [SailfishDevel] Javascript Object problem

2015-03-20 Thread Luis Manuel Ramos Da Costa
I don't know if this can help, but Javascript and QML work in separate process, and because of this any variable change on JS to be read in QML (or vice-versa) should be readed using a onXXXChanged (XXX bein the variable name). I had a similar problem with reading values from a JSON object, where

[SailfishDevel] Javascript Object problem

2015-03-19 Thread Andrey Kozhevnikov
Hello! Can someone help me to understand why this simple code working bad: https://gist.github.com/CODeRUS/3911cfe69ab9866e99da Just click on "Add" button and compare input and result id inside Object. It's different. Best regards, Andrey ___ Sailfi