Quote from Ronnie on May 8, 2020, 8:39 amHi @luishp, I was trying out the neoLocalStorage plugin, and replacing the getItem/SetItem with the neoGetItem and neoSetItem.
After creating a new db with neoSetItem, subsequent attempt to retrieve the db using neoGetItem resulted in the 'invalid character" error. Note sure why I've done wrong as the assumption is simply to replace GetItem with neoGetItem, and SetItem with neoSetItem
Attached is a modified sample using neoLocalStorage...
Hi @luishp, I was trying out the neoLocalStorage plugin, and replacing the getItem/SetItem with the neoGetItem and neoSetItem.
After creating a new db with neoSetItem, subsequent attempt to retrieve the db using neoGetItem resulted in the 'invalid character" error. Note sure why I've done wrong as the assumption is simply to replace GetItem with neoGetItem, and SetItem with neoSetItem
Attached is a modified sample using neoLocalStorage...
Uploaded files:
Quote from luishp on May 8, 2020, 10:39 amHi @ronnie, please note neoSetItem and neoGetItem are asynchronous. So to be sure the data has been loaded you must process it into a subroutine (third parameter) or use a Wait command to be sure the data is available when the next command is executed.
I think @noyzen probably faced the same problem.Regards.
Hi @ronnie, please note neoSetItem and neoGetItem are asynchronous. So to be sure the data has been loaded you must process it into a subroutine (third parameter) or use a Wait command to be sure the data is available when the next command is executed.
I think @noyzen probably faced the same problem.
Regards.
Quote from Ronnie on May 8, 2020, 2:28 pmHi @luishp, I noticed each time I created the db, it's shown in IndexDB section. However, when I rerun the project again, it couldn't find the earlier DB and created a new DB. Is this only a 'session-like' db where when the program exited, the db is cleared?
Hi @luishp, I noticed each time I created the db, it's shown in IndexDB section. However, when I rerun the project again, it couldn't find the earlier DB and created a new DB. Is this only a 'session-like' db where when the program exited, the db is cleared?

Quote from luishp on May 8, 2020, 5:23 pmIs this only a 'session-like' db where when the program exited, the db is cleared?
@ronnie not it isn't. Unless your web browser is configured to delete the cookies once you close the window. If you press F5 to reload the application you should be able to load the saved data. Anyway try testing using an "http://" protocol (with neoPhp Server or any other web server) instead of the default "file://" as this one has more security restrictions.
Is this only a 'session-like' db where when the program exited, the db is cleared?
@ronnie not it isn't. Unless your web browser is configured to delete the cookies once you close the window. If you press F5 to reload the application you should be able to load the saved data. Anyway try testing using an "http://" protocol (with neoPhp Server or any other web server) instead of the default "file://" as this one has more security restrictions.
Quote from Ronnie on May 9, 2020, 5:50 amHi @luishp. Yeah, it's probably due to my side.
The funny thing is when I changed back all reference to neoSetItem to SetItem, and neoGetItem to GetItem, whatever I added to the user record , saved it, I noticed the file was updated in LocalStorage file. However, when I replace the GetItem/SetItem with neoGetItem/SetItem, I noticed only the initial created records are saved. Subsequent adding of records, while shown correctly on the neoTable, was not updated to the IndexDB file. I even tried pressing F5 to refresh...
It's puzzling as what you've suggested - simply replace GetItem/SetItem with neoGetItem/neoSetItem and the project should run... LocalStorage works fine... but not neoLocalStorage. 8((
Hi @luishp. Yeah, it's probably due to my side.
The funny thing is when I changed back all reference to neoSetItem to SetItem, and neoGetItem to GetItem, whatever I added to the user record , saved it, I noticed the file was updated in LocalStorage file. However, when I replace the GetItem/SetItem with neoGetItem/SetItem, I noticed only the initial created records are saved. Subsequent adding of records, while shown correctly on the neoTable, was not updated to the IndexDB file. I even tried pressing F5 to refresh...
It's puzzling as what you've suggested - simply replace GetItem/SetItem with neoGetItem/neoSetItem and the project should run... LocalStorage works fine... but not neoLocalStorage. 8((

Quote from luishp on May 9, 2020, 12:58 pm@ronnie as you know neoLocalStorage is a LocalForage library wraper. I have not extensively tested it but the few tests I did were ok. Will try to do a closer look as soon as I can.
Thank you!
@ronnie as you know neoLocalStorage is a LocalForage library wraper. I have not extensively tested it but the few tests I did were ok. Will try to do a closer look as soon as I can.
Thank you!

Quote from luishp on May 12, 2020, 2:23 pm@ronnie note that using neoSetItem and neoGetItem you can save and load JSON data directly. No need to stringify the JSON to save it nor parse the JSON to use the data again. That process is done automatically. I think the problem could be there.
Regards.
@ronnie note that using neoSetItem and neoGetItem you can save and load JSON data directly. No need to stringify the JSON to save it nor parse the JSON to use the data again. That process is done automatically. I think the problem could be there.
Regards.