Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

replacing characters in rtfeditorkit  RSS feed

mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
greetings. i have a little problem with my code. try to enter some few text in as many lines are you want. and press alt-p, some symbols will appear replacing newline and space characters.

my problem is when the caret cursor's position is beside the last line's text, that last line will disappear instead of being formatted. but if the caret position is in the last line, then everything will be formatted correctly and there are no missing text.


line 1: abcd1
line 2: abcd2
line 3: [caret cursor]
formats correctly

line 1: abcd1
line 2: abcd2 [caret cursor]

when i press alt-p only line 1 will be shown and formatted, line 2 is gone. i figure the problem may be somewhere in the scanmiddledotduplicate() method in the myrtfeditorkit class.

i have attached sample code ready to run and test

anyone got ideas? thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!