[TextEditor-mcc] Re: MUIA_TextEditor_ContentsLen

  • From: Jens Langner <Jens.Langner@xxxxxxxxxxxxxx>
  • To: texteditor_mcc@xxxxxxxxxxxxx
  • Date: Wed, 13 May 2009 15:14:27 +0200

Gianfranco "ShInKurO" Gignina schrieb:

> Il 13-Mag-2009, Jens Langner scrisse: 
> 
>> But ContentsLen does not always correspond to what an ExportHook will
>> actually make out of it. For example, consider your are adding a text
>> to a TE.mcc object with only control characters (e.g. bold, italic) and
>> without any real text. When you then call the export hook the actual
>> text that you will receive via ExportText() will have a strlen() of
>> zero. However, the ContentsLen will still return > 0 because the
>> control characters (bold, italic) are actually within the Contents
>> variable, right?
>>
>> So perhaps it would be better to have an MUIM_TextEditor_ExportTextLen
>> method instead? Or did I miss something? comments?
>>
> 
> MUIA_TextEditor_ContentsLen is only len of plain text contained into TE, it
> doesn't cosider any kind of style, like ExportText with Plain value does...
> sure it could be possible that someone would know len of a text considering
> an EMail exporthook or similar for example, uhm...

As I said, I think it would be more correct to count the length of the
text/string after it has been processed by the currently established
ExportHook. Just counting the characters in the Contents variable
doesn't guarantee that it is correct.

> Ok, I'll see how to implement a MUIM_TextEditor_ExportTextLen before to
> committ all:-)

In fact, it would simple do what you are currently doing yourself. Call
ExportTest(), do a strlen(), and FreeVec() it again and then return the
length. Nothing more really.

> btw, when do you believe you will release TextEditor and Yam for AROS? So I
> can "sincronize" my next NoWinED AROS version with them...

YAM for AROS will take some time, I am afraid. In fact, I haven't even
tested the cross-compiler TextEditor.mcc for AROS yet. Do you have a
running cross-compiler for AROS? If so, I would highly appreciate it if
you could compile TE.mcc for AROS with the current sources and see if it
still runs fine.

regards,
jens
-- 
Jens Langner, Dresden/Germany
http://www.jens-langner.de/
-- 
_____________________________________________________________________________
TextEditor ML   - http://www.freelists.org/list/texteditor_mcc
Listserver help - mailto:texteditor_mcc-request@xxxxxxxxxxxxx?Subject=HELP
Bugtracker......: http://sourceforge.net/tracker/?atid=731469&group_id=135025


Other related posts: