I have a terrible situation where a Project I was working, got corrupted after my PC unexpectedly shut down (yes, black screen - no power, without any warning…) while working on the project (maybe even saving at the time of the incident)…
ok, I have managed to restore Forms and relevant controls by transferring files and folders from the corrupted folder to a new project’s folder but the code behind the form is missing. Where would I find the code behind a form’s elements?
This is not a statement about AppStudio but about development in general:
It’s a very good idea to come up with your own convenient way of frequently taking a copy of your project folder and saving. Regardless of the development tool I am using, I do this all the time. Literally at least every hour while developing. I copy the whole folder, and I give it a unique name by using the date and time in the folder name. Then, whenever I need to walk Backwards, I can just flip back to a previous folder.
There are many ways to achieve it, but however you do it, it is a good idea to get in that habit.
For anyone having the same issue as me, please note the following:
I came up on a situation where the .js (code files) where gone after an unexpected shut down, without having a backup of my project.
Fortunately for me, I had deployed the app to a local folder (Deploy in Local Folder option).
So, what I did to restore the missing code was to go to the folder where I had deployed the app and grab it from the code.js file residing inside the folder root path.