frontCall localStorage cannot be found

Started by José V., February 09, 2021, 03:56:52 PM

Previous topic - Next topic

José V.

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.

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.

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!