[Moin-user] Java exception when attempt to edit
Garland, Tony
Tony.Garland at fluke.com
Thu Sep 1 09:17:56 EDT 2005
Thanks Brandon,
I guess the twikidraw.jar file needs to be built with an updated
version of StorableOutput:
|In CH.ifa.draw.util.StorableOutput, mod the following method (around line
#98 in my version):
|
| public void writeString(String s) {
| fStream.print('"');
| for(int i = 0; i < s.length(); i++) {
| char c = s.charAt(i);
| switch(c) {
| case '\r': break; // suppress the \r being written out
| case '\n': fStream.print('\\'); fStream.print('n'); break;
|
|I used the new switch case to suppress the \r case which was stuffing up my
files. There's probably a more elegant and |general solution out there!
It appears the latest twikidraw.jar file from twiki.org doesn't address this
issue.
> Date: Wed, 31 Aug 2005 11:07:05 -0400 (EDT)
> From: Brandon Kuczenski <bkuczens at andrew.cmu.edu>
> To: Thomas Waldmann <tw-public at gmx.de>
> cc: moin-user at lists.sourceforge.net
> Subject: Re: [Moin-user] Java exception when attempt to edit
> existing drawing
...
> I don't know if there's a bug filed, but this is listed in
> the TWikiDraw
> discussion: http://twiki.org/cgi-bin/view/Plugins/TWikiDrawPluginDev
>
> The problem is caused by a text object containing a newline.
> When the
> user enters a newline into a text object, it generates a
> spurious ^M in
> the source which confuses the .. uh, parser? I found that I
> could get the
> drawing to load if I edited the .draw file by hand and
> removed the newline
> syntax.
>
> This is actually the reason I subscribed to this list, but I
> think it's a
> TWikiDraw problem rather than a MoinMoin problem.
>
>
> --
> Brandon Kuczenski
> Department of Mechanical Engineering
> Carnegie Mellon University
>
More information about the Moin-user
mailing list