GordonG
Posts: 0
Joined: Wed Jun 11, 2014 5:50 am

edit startScreen.js vs mapping js code?

I note that all of the service mappings to javascript code are reproduced in the page's javascript resource file:

Does that mean we can edit a page's js resource, e.g. startScreen directly and any modification is reflected back in the mapped js code?

having a lot of mappings to javascript execution makes coding spaghetti, and being able to edit everything in one file would be nice - I am hoping the answer is affirmative...!

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

edit startScreen.js vs mapping js code?

Hello Gordon,

After the changes made on the source tab all changes made in bilder won't influence to the changed files. You can find more ingormarion here: http://devcenter.appery.io/documentat...

GordonG
Posts: 0
Joined: Wed Jun 11, 2014 5:50 am

edit startScreen.js vs mapping js code?

OK, I won't touch the source code until the end - if necessary.

Now I've found a slight problem:

I added a javascript to a button via the event tab, to a click event. Now, I have edited the js code in the click event, but the old code still executes. I have tried deleting the event, and adding it again with the new code, but the old code still executes. When, I open the source tab js file, I note the old code is still in there.

What is preventing my new code from replacing the old code?

GordonG
Posts: 0
Joined: Wed Jun 11, 2014 5:50 am

edit startScreen.js vs mapping js code?

OK I fixed it - I had, evidently, typed a couple of characters into the source code for the page and then immediately deleted them. Little did I know that would automatically be registered, and decouple the source code from the visual builder.

I found a post where the instructions to delete the source, and then undo all source changes would reestablish that link.

Having the source automatically register changes is dangerous, UI wise. it would be better if you had a save button, so that any inadvertent changes require explicit action by the user to commit edits.

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

edit startScreen.js vs mapping js code?

Gordon,

Thank you for the update. Let us know if you need any further help.

Return to “Issues”