Danielo, On Tue, Aug 23, 2016 at 7:52 PM, Brian Theado <[email protected]> wrote:
> [...] > >> Only the data that is currently loaded in memory is included. What does >> this mean? By default, when tiddlywiki uses a sync-adaptor it first >> requests to it all skinny tiddlers. Those are tiddlers without the text >> field. When that tiddler is opened then the text field is downloaded. Let's >> review one example: >> >> 1. You open your NoteSelf wiki. All the skinny tiddlers are loaded >> from the local DB. Those tiddlers are not completed, they miss the text >> field. >> 2. You add some tiddler with some text. That tiddler is saved to the >> local database and to the wiki store (currently loaded wiki) >> 3. You save the wiki. What you will get is a TW with your tiddlers >> for this editing sessions and maybe those that you have opened for >> reading. >> >> That was news to me. Thanks for explaining it so clearly. > I now have some evidence there is more to the story than what you explained. I was stepping through the code in the debugger to help me learn about the syncadapter functionality in general and the pouchdb adapter in particular. I had a breakpoint set in PouchAdaptor.prototype.loadTiddler and when I hit the save button, I saw the load tiddler was triggered for every tiddler I had stored in pouchdb. Even the ones which were not open and I hadn't opened. But before the asynchronous loading could take place, I saw the html file appear in the downloads status bar at the bottom of my chrome window. I guessed that the tiddlers got loaded, but only after the download file was generated. And I figured if they all loaded, then if I hit the save button a second time, then the download would this time contain the bodies of the tiddlers. I did a diff of the first download against the second and found that I was right! If I'm not missing anything, then a full download can be had by clicking save, then waiting long enough for the tiddler bodies to be asynchronously loaded, then clicking save again. Not the most user friendly, but it seems to work. Here's how you can duplicate my test: 1. open a new noteself database instance 2. create a few tiddlers with some body text 3. close all tiddlers 4. refresh the page (no open tiddlers = no tiddler body loading) 5. click the save button 6. look in the console for the "PouchAdaptor: Retrieving tiddler" message 7. click the save button a 2nd time 8. compare the two html files, noticing that the 2nd one has the tiddler bodies and the first does not. Brian -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAO5X8Cz3fuqqewbUsnB_JNn25pPexCAnQPSFQNMeSFZSfEzwVQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

