Jump to content

How can I access Local Storage


paul.coshott

Recommended Posts

Hi Sherzod,

As I am using the trial version, I don't seem to be able to attach files to the forum. I have started a question in the support portal and attached a demo project. Maybe once you have looked at it, you could attached the working project back here for those that are interested.

Thanks for looking into this.

Cheers,
Paul

Link to comment
Share on other sites

  • 1 year later...
46 minutes ago, Sherzod said:

Hi,

Have you looked, tested the above code examples?

Specifically, what do you want to save, and how do you want to use it further?

Hi Sherzod,

Yes I tested the above. But I have an array (multi-dimension) I wish to save and retrieve from/to localstorage.

How to do it?

 

Thanks,

Frances

Link to comment
Share on other sites

Just now, Sherzod said:

For example?

Hi Sherzod,

...

const  aArray : array [0..2, 0..2] of string = (
    ('A0', 'A1', 'A2'),
    ('B0', 'B1', 'B2'),
    ('C0', 'C1', 'C2') );

...

I would like to save the content of aArray into localstorage.

 

Thanks,

Frances

Link to comment
Share on other sites

23 hours ago, fraxzi said:

I would like to save the content of aArray into localstorage.

Hi,

Sorry for the late response.

I think, you need to "encode" the array into a string, and save it in localstorage as a string, unless, you want to use it as an array on the client side.

And then, say, at the start of the project, get this value, and "decode".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...