How can I handle the texteditor line by line?
The only actual solution I found is to copy the text into a table where each table item is a texteditor line being split by chr(10).
Once modified I rewrite the entire texteditor text by merging the table lines.
This is not a good solution as I duplicate the data and I have a double handling.
I'm also in difficulties to set the Area Mark because it requires the character count of all previous line characters.
Any hint..
thanks
Texteditor line by line
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Texteditor line by line
What do you mean by "handle the texteditor line by line"? Do you want to extract a single line of text from a text editor widget?
Re: Texteditor line by line
Correct, i.e extract line 12 modify and then rewrite back (may be with a different length).
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Texteditor line by line
I think it's a TextEditor.mcc limitation. It currently doesn't seem to have a way for getting the absolute character position for a line index and vice versa. Complain here: https://github.com/amiga-mui/texteditor/issues
Of course, it's possible to do this manually by getting Texteditor.Text and then scanning for linefeeds but that's of course a lot of overhead... it should be TextEditor.mcc's job to provide this...
Of course, it's possible to do this manually by getting Texteditor.Text and then scanning for linefeeds but that's of course a lot of overhead... it should be TextEditor.mcc's job to provide this...