Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

LocalStorage is always NaN

FIRST TRY

I tried "window" global variable created from Project Model & Storage.

Firefox console, "window is not defined".

We are defining in function. But We want defining to function out for global variable. Apperyio this disallow.

TRY 2

I added new javascript file from "create new", I will guess this like it happening. (depo.js)

var __ygs = {};
var __lys = {};
var __net = {};

And, I added this storages from about of the page, this like;

__ygs['Blabla'] = var1;
__ygs['Blabla2'] = 321;

This time no error, They aren't keep to data.

And after try like apperyio type; (result is same still !)

localStorage.setItem('Blabla',var1);

Apperyio("test1").text(__ygs["Blabla"]);

Result is NaN.

TRY 3

I found it http://devcenter.appery.io/tutorials/...

and try, this result is same NaN.

TRY 4

I clear all this, I create a new LocaleStorage type of Number from Model and Storage. It is name is "ygs1" and My value sent page clicking button with "run javascript" event. Write this code (after my transactions );

localStorage.setItem('ygs1',YGS1);

And Page orientation with button clicking. I added Set Property from this page, I selected my localStorage variable. So "ygs1"

Second, Load event add "run javascript" code;

Apperyio('test1').text(localStorage.getItem('ygs1'));

Result is NaN.

I don't understand ! Almost I tried everthing since yesterday.

---------------------

My project is public, so editor can change ! (I have a one project)

Thank you for interest.
I am waiting for you feedback two days !!

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

LocalStorage is always NaN

Hello,

How do you set var1 variable ?
It looks like you don't have any init for it
pre__ygs['Blabla'] = var1;/pre

Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

LocalStorage is always NaN

Init has a page of the about. So clicking button event in as javascript.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

LocalStorage is always NaN

Hi -

If your are set your variables through the Model & Storage in Appery.io you will need to use corresponding API in this case: http://devcenter.appery.io/documentat...

Return to “Issues”