2009/6/5 kcrisman <[email protected]>: > > >> due to a *major* bug in the tinyMCE integration, which anybody who has >> seriously used the SAge notebook has run into. Nobody has come up >> with a clean test case though. My worksheet is unfortunately >> completely scrambled, and I'll have to spend an hour sorting it >> through. Jason, since you wrote the tinymce integration into sage, >> any idea why it would randomly scramble things? > > Yes, and it's always just before class is about to start. It's SO > annoying.
Unfortunately, I just got done teaching my last class before the summer break, so now it'll be even harder to debug this! > >> If *anybody* has any idea how to systematically replicate this "random >> scrambling" of worksheet contents, please post. > > I can't quite do it, though I've tried many times. BUT I do know what > it does, I think. I believe that somehow TinyMCE is recording the > inputs and eventually gets too much input if you don't save the > worksheet. Then (I'm pretty sure, again can't replicate) everything > since your last save/the last time TinyMCE could handle it is appended > in REVERSE order at the bottom of the worksheet - check it out! I > hope this helps Jason or someone else replicate it. That makes some sense. Not having looked yet, I'm guessing that the TinyMCE code in Sage doesn't properly verify that code was actually inserted by the server into the server's copy of the worksheet. E.g., when you insert a new cell in the notebook, you do *not* see that new cell inserted until the message goes to the server "insert this cell", then a message comes *back* saying "new cell inserted". Try the following: (1) start the notebook server (2) make a worksheet with some cells include some tinymce cells (3) kill the notebook server. (4) notice that you get a big error when you attempt to insert a cell (5) try to edit a tinymce cell. Notice that everything appears to work fine, but in fact it can't be since the server doesn't exist. The above "proves" that if the message "this text cell has changed" from the web browser to the server somehow gets dropped, then one will silently just have edits vanish. Maybe they get sent later, which is why they appear elsewhere in the document. In any case, irregardless of it fixing the reording bug or not, the tinymce integration code should be changed so that when you save your changes to a cell, it does a roundtrip to the server to make damn sure the changes really got sent. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
