Saul Galloway
Posts: 0
Joined: Wed Apr 30, 2014 7:52 am

Download finished tutorials

Is there a way of downloading a completed tutorial example. I have entered "Building a simple ToDo app with Appery.io Backend Services, part 2: working in offline mode" from scratch twice but cannot get it to synch the offline data when the phone goes online, so presume my code is bugged in some way and want to compare to a working example.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Download finished tutorials

Hi Saul,

Unfortunately we do not have a completed example.
Could you please check all the steps again?

Saul Galloway
Posts: 0
Joined: Wed Apr 30, 2014 7:52 am

Download finished tutorials

Re-entered from scratch for a 3rd time and as listed on the tutorial it seems bugged. The only tutorial step that looks different from my workspace to the tutorial screenshots is "Adding a delete service" step
Image

Using Appert.io tester to run on a nexus 5. App works as intended, apart from when I switch off the wifi on the phone, it notes that and footer label goes to offline correctly, can still add and remove tasks offline, but then when I reactivate wifi, the spinner runs and the list jumps back to the pre-offline listing. i.e. it is not updating the online database from the local stored variables as intended.

I left it as the only app in my account so you can examine.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Download finished tutorials

Hi Saul,

Please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
docs.appery.io/documentation/sharing-and-collaboration/

Saul Galloway
Posts: 0
Joined: Wed Apr 30, 2014 7:52 am

Download finished tutorials

Happy to but not possible on beginner account

Team size 1
Used seats 1
Available seats 0
You can't grant more than 1 licenses

Saul Galloway
Posts: 0
Joined: Wed Apr 30, 2014 7:52 am

Download finished tutorials

Shared

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Download finished tutorials

Saul,

Thank you, we'll test.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Download finished tutorials

Hello!

Fix 58 code line here http://docs.appery.io/tutorials/build...
Instead prevar tasksArr = eval('(' + tasks + ')');/pre use prevar tasksArr = eval('([' + tasks + '])');/pre

Saul Galloway
Posts: 0
Joined: Wed Apr 30, 2014 7:52 am

Download finished tutorials

Getting there.

I'm no JS programmer but if when offline you add and delete an item then you will

var tasksArr

twice, in the create and delete "if" loop. Needs to be var 'd before the if loops.

Also if you follow your tutorial steps exactly in the delete service mapping you get as per my screenshot, ie. _id mapped to _taskId

so line 47 as per your tutorial JS numbering is

Code: Select all

 
                    delete_service.execute({data:{object_id: task.id}}); 
 

but needs to be

Code: Select all

 
                    delete_service.execute({data:{_id: task.id}}); 
 

then all works as expected.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Download finished tutorials

Thank you for update!

Return to “Issues”