XWidgetSoft Forum
https://www.bbs.xwidget.com/

location of autosaved text fields
https://www.bbs.xwidget.com/viewtopic.php?f=8&t=2640
Page 1 of 1

Author:  D55 [ February 22nd, 2013, 12:08 pm ]
Post subject:  location of autosaved text fields

For some unknown reason, a couple of eker notes instances vanished from my desktop and even the folder was deleted; I mention I don't have any malware;
I want to know in what location are the text fields saved (I'll try to recover them), so that I can back-up them from now on. Thak you.

Author:  Sooner266 [ February 22nd, 2013, 4:36 pm ]
Post subject:  Re: location of autosaved text fields

They aren't saved to any file on disk by default; they're just held in the memo field of the widget. So unfortunately your old ones are gone. The easiest way to back them up would just be to copy and paste the text into a text file. You might be able to set it up to do it automatically in Javascript, but the whole multiple instances thing would make it a big headache.

Author:  D55 [ February 22nd, 2013, 5:56 pm ]
Post subject:  Re: location of autosaved text fields

Thanks for your time to respond.
I found that fortunately they are saved to a file, if the autosave memo option in the designer is checked, in which case they are saved to AppData/Themes/Default/Theme.xwt, which is just a txt file with a different extension.
Luckily I copied that file that somehow still contained the memos, even if it didn't read them (because the widget folder got deleted after I ended a svchost process that was topping the CPU to 100%). The next time I started the widget (in fact after I added another widget) the Theme.xwt was reset to default, with memos vanished.
Otherwise, I would have lost about two months of ideas and inspiration (I put the best I find on my desktop, I have designed I nice translucent note app that I will share here when I will have time).
I'll come back in ~2 days with a comment with the method I used to determine where the memos where stored, because it might be useful in many situations, not just with this program (now I am extremely time pressed with some other work).
God I will never trust any piece of software/hardware too much from now on, back-up is a must!

Author:  D55 [ February 27th, 2013, 2:20 pm ]
Post subject:  Re: location of autosaved text fields

So here's the method I use to find where does an app store data.
If an application displays the same type of data, usually text, after a system restart (or after you fully close & reopen it), then it must save that data to one or more files, either in the application folder, either on some other profile folder stored somewhere else.
In order to find out which file/files is that written to, you have to determine which file changes size.
1) first you note (or remember) what is the initial folder size of the application's folder, down to the last bytes, by right-click and checking properties. Watch only size, not size on disk! Then you start the app and write some text (or whatever kind of data), and after that you close it. Now re-check the size, and if it's not changed repeat the process further described, but applied to all folders in the system partition (and don't forget before to activate the option to see al hidden files, including hidden system files).
2) next you select one half (or plus one if the number is not even) of the first next level of folders and files and find out their size; do the same for the other. Next you start the application, write some text, close and check again the sizes. Then you see which half changed in size, if only one half changed then continue the process of open-write-close and checking size, by taking sub-halves till you find which folder is changing, then continue to the sub-folder until you find the exact file. If there are changes in both the halves you divide each of them until, again, you find the only files and folders which change. Usually it's just one.
-Then, depending the type of data you were writing, you can try opening the file with a specific program, if you need to recover data. Some kind of files are hardcoded and can't be opened with anything else than the program that created them, other are simple txt, xml or other types of files, sometimes with different extensions but they still can be opened in Notepad for example.
-If you don't need to open the file you can backup it up, if you need to have a safe copy, or set a rule in a back-up program for periodic back-up.

Author:  wordsmith101 [ March 2nd, 2013, 7:17 pm ]
Post subject:  Re: location of autosaved text fields

Thank you so much for the tip about the theme.xwt file! I was able to retrieve all my lost notes, which disappeared in the last upgrade. I think I am finished with xwidget--it is too unreliable--but at least I have my notes again. Thank you!

Author:  Armando [ March 3rd, 2013, 5:08 am ]
Post subject:  Re: location of autosaved text fields

I want to thanks also! It's very important this matter. I lost, in the past, a lot of important notes!...
Thanks you very much!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/