Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

Building a ToDo app pt. 2: offline mode

I found this code was a problem for me:

$('[dsid="inputTaskName"]').val('');
createServiceExecute();

When I enter INPUT , and click the BUTTON, nothing happens.

I decided not to use it , and instead,

I made the BUTTON click event to use my create_service. After this, everything worked out great. I still kept the setting of the local variable inputTaskName as described, but I couldn't get this original code to work.

What happened?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Building a ToDo app pt. 2: offline mode

Hello Alex,

Could you please check whether you did exactly as it is in tutorial? Also please tell, do you get any errors in console?

Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

Building a ToDo app pt. 2: offline mode

i did check, and yes with the CHROME JAVA SCRIPT window, there are many inconsistencies in the naming

Many times there are services like "createservice" confused with "create_Service" or "create_service" which as you know is not good for the app to follow.

This was the problem. I had changed this in the javascript and now in the

$('[dsid="inputTaskName"]').val('');
createServiceExecute();

to be

$('[dsid="inputTaskName"]').val('');
create_serviceExecute();

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Building a ToDo app pt. 2: offline mode

Hi Alex,

Please specify: do you add JS code descibed here?:

http://devcenter.appery.io/tutorials/...

There is "createServiceExecute" function.

Also please give us screen shot with JS error that's you see in browser console.

Regards.

Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

Building a ToDo app pt. 2: offline mode

It is difficult to provide a screenshot because I believe the code needs to be checked everywhere, the javascript that runs the ONLINE OFFLINE status, the code you copy and paste , and there needs to be more consistency, because the computer didn't execute code for createServiceExecute() but DID execute code for create_serviceExecute().

The user sets up the app with create_serviceExecute(), but in different parts of the tutorial, you can find:

createServiceExecute();
createserviceExecute();

so this gets confusing. I think the code needs review, especially the code that relates to pressing the button to update the ToDo List.

Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

Building a ToDo app pt. 2: offline mode

I also changed the code for myself to make everything say create_serviceExecute and this format makes the app work. I just had to look through all parts of the javascript and Appery to make the app work.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Building a ToDo app pt. 2: offline mode

Hi Alex,

I've checked our tutorial http://devcenter.appery.io/tutorials/...

but could not find these two different function names(you have provided us above):

pre

createServiceExecute();
createserviceExecute();

/pre

But we are glad to know that you have fixed your problem.

Regards.

Alex Van Name
Posts: 0
Joined: Mon Jun 30, 2014 7:36 pm

Building a ToDo app pt. 2: offline mode

I think I made a mistake interpreting the java script for...

When declaring a function in javascript, called createServiceExecute(), this is different than an actual command like create_service.execute()

Image Image

I changed every name like create_service.execute(), even in the javascript because it was too difficult to see where my own mistake might have been.

I'm sorry for this confusion. I am still learning javascript.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Building a ToDo app pt. 2: offline mode

Alex,

No problem with this. Don't stop to learn JS and make good things with Appery.io platform. We will help.

Regards.

Return to “Issues”