[SailfishDevel] Javascript Object problem

jklingen sailfish-devel at jklingen.com
Sat Mar 21 10:38:06 UTC 2015


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 getting too large.

Best regards,
Jens


Am 19.03.2015 um 13:50 schrieb 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
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to 
> devel-unsubscribe at lists.sailfishos.org



More information about the Devel mailing list