Is it possible to persist objects between sessions?
I want to persist a list of objects between sessions. When I used Titanium.App.Properties.getList / setList I can set store an array of my own object during a session, but not in between. Storing integers works fine.
Maybe I'm creating the objects wrong? Or maybe storing objects just isn't possible?
Thanks
James
4 Answers
-
i use getList/setList to persist my objects between sessions. Sometimes when i restart the emulator it forgets - but works fine when running on the device.
also Try - without closing the emulator - quit the app and then restarting the app. -
why don't you serialize the objects using JSON.stringify()?
-
I will give this a go - thanks for the suggestion
-
edit: sorry, double post when reloading the page to see if there were any updates