Author Topic: Storing Persistent Data?  (Read 6372 times)

phantomfoot

  • Newbie
  • *
  • Posts: 2
Storing Persistent Data?
« on: February 21, 2012, 01:41:47 PM »
Hi,

I wondered if HAC can store variables and data persistently, so that when you close the app and then reopen it you can re-populate the variables with those stored on the phone.

For example to save a variable 'money' as 100, then when you re-run the app the variable 'money' is still 100 from when you last used the app.


If so, how do you go about doing this?


Thanks,


Steve

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Storing Persistent Data?
« Reply #1 on: February 21, 2012, 06:31:21 PM »
Hi,

I wondered if HAC can store variables and data persistently, so that when you close the app and then reopen it you can re-populate the variables with those stored on the phone.

For example to save a variable 'money' as 100, then when you re-run the app the variable 'money' is still 100 from when you last used the app.


If so, how do you go about doing this?


Thanks,


Steve
Hi Steve

HAC and HyperNext apps, whether on Android or desktop are supposed to have persistant storage for all their fields, local and global variables - so when an app quits there is the option to automatically save them all and then automatically restore them when the app reloads. Unfortunately there is a serious bug preventing this reloading process on Android - we are currently fixing it right now - so it will be working in the next update.

HAC can save and reload files but compared to the persistant data approach it takes a lot more work.

We are also working on the SQLite database functionality as its great for persistant data but its not ready yet.

I'm sorry to disappoint but I hope this explains things.

Malkom
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

phantomfoot

  • Newbie
  • *
  • Posts: 2
Re: Storing Persistent Data?
« Reply #2 on: March 06, 2012, 02:12:55 PM »
Thanks for that Malkom. Do you have an ETA of when the next update will be released?


Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Storing Persistent Data?
« Reply #3 on: March 06, 2012, 08:22:52 PM »
Thanks for that Malkom. Do you have an ETA of when the next update will be released?

Hi Steve

We can't be certain but V1.13 looks to be towards the end of next week although it also depends upon what feedback we receive.

A lot of improvements are going in to this one as the previous few concentrated mainly on bug fixes and making both HAC and its apps multi-lingual.

Malkom
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Storing Persistent Data?
« Reply #4 on: March 07, 2012, 04:00:47 PM »
just an update - the Persistant Data is now working for the forthcoming release(v1.13).

Essentially if the programmer wants their app to automatically save its data as stored in variables, fields etc,  they just issue the command QuitSave(1) in their quit routine. If they don't want it to save they just use QuitSave(0).
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.