CocoonJS error

Discussion and feedback on Construct 2

Post » Sun Jul 08, 2012 4:30 pm

Hi

Due to the nature of my app, I cannot provide a capx file.

But here is the error I receive:

JSUtlities Exception: ReferenceError: Can't find variable: sessionStorage Cause: Tag: requestAnimationFrame Function: function() {b.Ec();}

This is from a page where I tell it to automatically navigate to a new layout after x seconds using the following method:

System - Trigger Once:
-> Wait 3 seconds
-> Go to layout "Home"


On the next layout I do use the WebStorage object to check if a key exists in Session Storage first, and then its value.
B
22
S
7
G
3
Posts: 189
Reputation: 4,270

Post » Sun Jul 08, 2012 4:52 pm

Does removing the WebStorage object fix it? I believe CocoonJS only implements local storage, not session storage. Why do you need session storage anyway? It should have the same life span as a global variable. I'm considering deprecating session storage for that reason.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Sun Jul 08, 2012 5:59 pm

It might do. Will try it tomorrow (it's 7pm here, work is done for the day).

What would you say is a "maximum" global variable count? I just don't want to get to a situation where I start using too many....

I am using the session storage for certain tags and also conditions per level. If I can use variables for that then I will move over to it.

Thanks Ash.
B
22
S
7
G
3
Posts: 189
Reputation: 4,270

Post » Sun Jul 08, 2012 6:52 pm

You can use an unlimited number of global variables, and it will probably not have any measurable effect on memory and performance.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Mon Aug 27, 2012 8:50 pm

Hi,
don't know if this is the correct place to write this o should i open a new thread, but anyway, the title of this treath is the same as my problem, so i will post it here, correct me if wrong.

Can not post the .capx because is for commercial purpose.
But i'm getting this error:
JSUtilities Exception: TypeError: Result of expression 'a.canvas' [undefined] is not an object. Cause: Tag: timer Function: function () {a.go();}

Can't figure out what it's.

Thanks in advance....
B
28
S
5
G
4
Posts: 51
Reputation: 3,857

Post » Mon Aug 27, 2012 11:31 pm

@Behamut, please don't cross post - see my other post about posting a bug report.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630


Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite, eli0s and 7 guests