Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: frontCall localStorage cannot be found  (Read 8878 times)
Jos? V.
Posts: 55


« on: February 09, 2021, 03:56:52 pm »

I'm trying to use frontCall localStorage with GDC as the frontend but I always get the error "front End function could not be found" during runtime.

My code goes as following:
Quote
call ui.Interface.frontCall("localStorage", "setItem", [keyID,keyValue], [])

or:
Quote
call ui.Interface.frontCall("localStorage", "getItem", [keyID], [keyValue])

Am I doing something wrong? According to the manual localStorage should work on all frontends.

My FGL version is 3.10.18 and GDC is 3.10.11.

Thank you!


Reuben B.
Four Js
Posts: 1046


« Reply #1 on: February 09, 2021, 08:34:53 pm »

A search on "localStorage" in the Issue Tracker reveals https://4js.com/support/issue/?product=GDC&stat=&fixed_in=&words=localStorage&Search=Search

Clicking on https://4js.com/support/issue/?id=GDC-03980 suggests that there was an issue if the function wasn't in lower case i.e setItem vs setitem.

I'd suggest amending your code setItem -> setitem etc or upgrade to GDC 3.10.18 and see if resolved

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Jos? V.
Posts: 55


« Reply #2 on: February 10, 2021, 10:08:01 am »

I did search, but I did it for product FGL and that was my error.

Thank you Ruben, this has solved my problem.

Its working fine now!
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines