Page 2 of 2

ToDo app (from tutorial pt2) behaves like it is only in offline mode. How to bring in to online mode?

Posted: Tue Nov 11, 2014 5:43 pm
by Evgene Karachevtsev

Hello Dani,

Sorry, I'm not sure I understand you correctly, could you please specify it with more details?


ToDo app (from tutorial pt2) behaves like it is only in offline mode. How to bring in to online mode?

Posted: Tue Nov 11, 2014 6:08 pm
by Dani Mora

Sure.

I implemented Tutorial2 and works fine but with an weird behaviour.

In online mode I add 3 tasks (A,B,C) and works fine:

Then I switch to Offline mode and then I add a new task D. When the listview is refreshed all items disapear and only the new item "D" appears.

I then go back to OnLine mode. The synchronization occurs and four elements appear: A, B, C and D. OK!

Then I swithc back to Offline mode and add a new task "E".

Then in the listview I only see "D" and "E" (those elements were created in ofllinemode). This elements are stored in the _echo storage variable.

So, the problem is that in offline mode I only see elements cached or stored in the _Echo variable. I was expecting to see a "local copy" of the elements on the server but not some random items created in the previous offline session.

Is the sample intended to behave this way or I did something wrong?

thanks!

dani


ToDo app (from tutorial pt2) behaves like it is only in offline mode. How to bring in to online mode?

Posted: Fri Nov 14, 2014 6:56 pm
by Evgene Karachevtsev

Hello!

Sorry, we have errors in the tutorial, we'll fix them
1) http://devcenter.appery.io/tutorials/...
p. 1.4
instead of the code
preApperyio.storage.echo.set(JSON.stringify(this.data));/pre
should be
preApperyio.storage.echo.set(JSON.stringify(data));/pre
2) http://devcenter.appery.io/tutorials/...
54 the string please replace
tasksArr1
with
tasksArr