R151 Array load as JSON from webstorage bug

Bugs will be moved here once resolved.

Post » Thu Nov 21, 2013 2:41 pm

Link to .capx file (required!):
http://https://dl.dropboxusercontent.com/u/65841566/R151NewJSONwithArrayLoadBug.capx

Steps to reproduce:
1. (I already labelled the button base on step). Must run in debug mode.
2. Create Array (10,3,1) and webstorage
3. Clear Array and Webstorage
4. Init Array with values and save it to webstorage as JSON
5. Clear Array
6. Try load back the saved value from webstorage to Array.

Observed result:
R151 failed to load back the JSON saved
R150 able to load back. (same event or codes)

I noticed that JSON string is different between R151 and R150, the "size:" is included as data. I think this is incorrect right ?


R151 {"c2":true,"data":{"size":[10,3,1],"data":[[[100],["nom"],[0]],[[200],["nom"],[0]],[[300],["nom"],[0]],[[400],["nom"],[0]],[[500],["nom"],[0]],[[600],["nom"],[0]],[[700],["nom"],[0]],[[800],["nom"],[0]],[[900],["nom"],[0]],[[1000],["nom"],[0]]]}}

R150 {"c2array":true,"size":[10,3,1],"data":[[[100],["nom"],[0]],[[200],["nom"],[0]],[[300],["nom"],[0]],[[400],["nom"],[0]],[[500],["nom"],[0]],[[600],["nom"],[0]],[[700],["nom"],[0]],[[800],["nom"],[0]],[[900],["nom"],[0]],[[1000],["nom"],[0]]]}



Expected result:
Array should be loaded fine. (Before this R150 and below the codes is working ok)

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Win8.1

Construct 2 version:
R151
    
B
84
S
24
G
14
Posts: 391
Reputation: 12,658

Post » Mon Nov 25, 2013 5:15 pm

Oops, the new AsJSON expressions conflict with the old one. Removed the conflicting expressions for the next build, which should fix it.
Scirra Founder
B
403
S
238
G
89
Posts: 24,659
Reputation: 196,165

Post » Thu Jan 02, 2014 2:26 pm

Looks like it's still a bug in R155..?
B
16
S
5
G
1
Posts: 23
Reputation: 2,673

Post » Thu Jan 02, 2014 3:25 pm

Hi @gerris

I just tested my previous capx with R155 and it seems working.
B
84
S
24
G
14
Posts: 391
Reputation: 12,658


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests