Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Problems with arrays

I'm having some trouble with arrays in Appery lately. Right now, I have 2d array that I want to access values from to create my own json object, but it keeps returning 'cannot read property 0 or undefined'

However, if I log it...

code
console.log(data[k][i*arrayLength+j]);
/code

it will log the result and then throw the error. Something seems fishy to me, it doesn't seem like it should work this way.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Problems with arrays

Hello! Please check if data variable is defined. Do preconsole.log(data);/pre and check result in console.

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Problems with arrays

Yes it is, when I created the variable and assigned the array to it, I logged it as well, and I can see the array.

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Problems with arrays

I just reloaded the application back to a previous version and it works fine now. However, I have been noticing stuff like this happening lately with code I know works, but isn't compiled correctly.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Problems with arrays

Hello! Could you give more details? Are there any steps to reproduce?

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

Problems with arrays

Basically, I modified the project and I can no longer call those 4 services manually using codeservicename.execute({});/code The app always gives an error, so it is always reproducible. I have a feeling that it isn't being compiled correctly.

Return to “Issues”