[TextEditor-mcc] Re: MUIA_TextEditor_ContentsLen

  • From: Jens Langner <Jens.Langner@xxxxxxxxxxxxxx>
  • To: texteditor_mcc@xxxxxxxxxxxxx
  • Date: Wed, 13 May 2009 12:11:59 +0200

Gianfranco "ShInKurO" Gignina schrieb:

> Il 13-Mag-2009, Jens Langner scrisse:
>> Gianfranco "ShInKurO" Gignina schrieb:
>>> as topic I've implemented this attribute to avoid to get always
>>> contents of TE to know only len or if there is text...
>> Is that new attribute really required? I mean you can anyway not get
>> the contents via MUIA_TextEditor_Contents (it is [IS.] only). And the
>> contents doesn't really say anything because it is depending on the
>> Import/Export Hooks implementation?
> I take for a notification chain to cursorx and cursory contents with
> exporttext, do a strlen() and freevec(), sure that
> MUIA_TextEditor_ContentsLen is useful, at least for me! :)

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?

>> BTW: You can at least commit the SetBlock changes you made because I
>> think they are fine. But please make sure to add this new method to the
>> autodocs of TextEditor first.
> Uhm, I'm not really sure about how can do this? Shall I write manually a
> documentation into autodoc file and commit this change to this file?

Yes. Go to the SVN repository, do your changes to the autodoc and then
commit the file. That's it. And make sure to keep the same indentation
and layout as the other attributes/methods in there already.

Jens Langner, Dresden/Germany
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: