Thu 17 Jun 2004, 10:55 PM
by Ben Langhinrichs
No matter how much you love Lotus Notes (and I can work up quite a bit of enthusiasm), you have to admit that a good Lotus Notes developer better be ready and willing to workaround a few of the, shall we say, "oddities" in the software. I have worked around a number of "features" myself, but I am not always the best person for this. I have met a few pros in my day, and Rocky Oliver has to be one of them. He is a wizard with formula language and a virtuoso with LotusScript, as many who have seen him speak can attest, but above all, he has a knack for solving problems with whatever works, even if it isn't the obvious.
Anyway, Rocky called me today because he was experiencing a problem with an application using our Midas Rich Text LSX, and he thought it might be something wrong with Midas. Fortunately, it was not. Unfortunately, it was a basic problem with Lotus Notes, and I couldn't whip up a fix for that. The problem was that he wanted an uneditable rich text field, but when he made a computed rich text field, he lost the font and the table, but still had text attributes and text. Sigh! I have long hated this bug. It is also a bit unpredictable, looking right at one point, then looking wrong again when the document is edited and saved again.
"So", Rocky said, "what can I do to work around this?"
My proposed solution
Now, with other people, I might just tell them to avoid the scenario, but I am not about to say that to Rocky. As a friend, co- Penumbra member, and guru (see above), I thought he might be able to handle something a bit more sophisticated, and perhaps help me develop an idea I'd had that might work. I suggested that he create a controlled access section, put the editable rich text field inside the section and make sure the person editing didn't have access. Voila! Uneditable rich text.
Problems with my proposed solution
So, I sent Rocky an e-mail later on, and asked how it was going. He wrote back
It technically worked, but it has this annoying thing where there is always some "artifact" on the page where the section is clickable, even if it is expanded and the title is hidden when expanded. Plus, if the user clicks this "artifact" (like a thick little dash), then it will collapse the section. I added a title that is faint that tells the user to click here to display the table, but it still feels a bit kludgy. If I could find a better solution I would use it, but for now it does accomplish what I want.
I must tell you, I grinned at this, because I knew Rocky would not allow some annoying artifact to muddy up his application. Sure enough, fourteen minutes later, he wrote again
OK, I got rid of the controlled access section, and switched to an editable RT field, not showing field delimiters, that has a uidoc.gotoprevField call in the Entering event. This basically gives me a RT item that can't be edited.And he is right. There may be something wrong with this workaround, but I haven't found it yet. For years, I have hated this bug but never desparately needed an answer. Rocky needed an answer, and figured something out in an afternoon.
Copyright © 2004 Genii Software Ltd.