I believe I found a fair compromise to deal with the conundrum.
#
- Pretty sure I figured it out. Of course I was looking in the wrong place. Staring at code that wasn't working and not questioning whether or not it worked. One of the oldest programmer debugging mistakes. How long have I been programming? Too long. I still make this most obvious error. I suck!!!#
- So here's the setup.#
- At least two tabs open, one is an instant outline, the other could be anything.#
- The other one is frontmost.#
- A change comes in for the instant outline. Since it is not frontmost, we stash the opmltext somewhere out of the way until the user activates the I/O by clicking in its tab.#
- Click in the tab of the I/O.#
- Drummer then starts activating the I/O. If it finishes before it gets to the code where it installs the updated outline, everything is cool, nothing gets overwritten. This is what's called a "race condition" in programming.#
- But if it's still doing the activation when it installs the opmltext, it will go into the other outline, which is now not visible.#
- And it shows the I/O but the old version of it. Since you don't what to expect, you don't notice it.#
- Then when you switch back to the other outline, oh my god, it's got the I/O outline. #
- If you then make a change, it will write it back out to the server. And you've lost your outline. #
- The fix was simple. Don't install the new opmltext until the I/O is fully activated. #
- As I've been writing this I've been switching back and forth over in Drummer on eveyr line I type.#
- It hasn't fucked up once! Hoo hah, I think I got it. 😀😀😀😃😄😁😆😅😂😇😉😍#
- I'm going to delete every day but today, August 26 and August 17. #
- Then I'm going to rebuild using the Tools menu command and see what happens. #
- Result -- as expected, the rendering included everything before the 17th, due to the compromise. #
- The caching is going to be a problem for people who do a lot of top-level editing of their blogs.#
- Maybe the right thing to do is to have a mode, set by a head-level attribute, that turns on caching. #
- That way newbies get the behavior they're expecting, and when their outlines get too big, we have a feature for them to turn on. #
- Not sure anyone will find the feature because well no one reads docs, right? Heh.#
- I think it's time to go for a bike ride. 😄#
- PS: That's exactly what I went with. There's a new option for Drummer blogs, they can turn on the caching, so they can delete days and they stay displayed on the blog. People will want to do this when their outlines get big, but that's not going to happen for a while. When they want the feature, the software will be ready. Search for this option: flOldSchoolUseCache. #