Page 1 of 1

edit startScreen.js vs mapping js code?

Posted: Mon Jun 16, 2014 6:32 am
by GordonG

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...!


edit startScreen.js vs mapping js code?

Posted: Mon Jun 16, 2014 6:57 am
by Evgene Karachevtsev

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...


edit startScreen.js vs mapping js code?

Posted: Mon Jun 16, 2014 7:27 am
by GordonG

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?


edit startScreen.js vs mapping js code?

Posted: Mon Jun 16, 2014 8:02 am
by GordonG

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.


edit startScreen.js vs mapping js code?

Posted: Mon Jun 16, 2014 8:04 am
by Evgene Karachevtsev

Gordon,

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