Forums

OverviewV-Play 1 Supportstorage – not persistent › Reply To: storage – not persistent

OverviewV-Play 1 Supportstorage – not persistent › Reply To: storage – not persistent
#6245

Michael

Thanks alot for your help. I’ve realised the issue. I’ve found often that not all my words are being stored in the sqlite file. Since I’m testing isFirstStartApplication using a word that is near the end of my word list, that word is sometimes not stored or present in the database, so it fails causing the reload. I’ve had a look in the sqlite database and noticed my all my words from the start are being stored to a point, but not all the words. I repeated this test exercise using

var isFirstStartApplication = myLocalStorage.getValue("AA")

where AA is the first word read in & stored, and the persistent test is passed, i.e. words were saved, and things are better.

However as an exercise, when I truncated my word list to 126 words & use the following to populate the sqlite db

for (var i = 0; i < arr.length; i += 1) {
  myLocalStorage.setValue(arr[i], true)
}

sometimes all the words make it, but sometimes not. Why is that?

I guess this loop is not the best method, and I should use the json file method.

Cheers,

Michael.

 

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support