[Lazarus] SynMemo crash after "Undo"

Martin lazarus at mfriebe.de
Sat Sep 10 13:24:11 CEST 2011


On 10/09/2011 09:52, Dirk wrote:
>> Lazarus 0.9.31 r32144 FPC 2.4.4 i386-win32-win32/win64
>>
>> Anyone has the same problem?
>> ...
>> Press Enter again: the synmemo throws an exception
>> "TApplication.HandleException Invalid stringlist index 2"
>>
>> Does not happen in the IDE source editor b.t.w.
>>
> Yes, exactly the same here.
> Using Lazarus 0.9.31 r32230M FPC 2.7.1 i386-win32-win32/win64
>

And it's TSynMemo only, TSynEdit works.

BTW, something I have been wondering for a long time: What is everyones 
facination with TSynMemo?

It's 99.9% identical with TSynEdit (except for the extra bug), it has 
only the folowing differenes
- it may publish less properties that TSynEdit. Not sure, but it has 
it's own list what is published, and TSynEdit publishes everything, so 
TSynMemo is less or equal
- it adds to wrapper function:
   Clear and Append => thay are 100% equal to Lines.Clear and Lines.Append
- and it adds CharIndexToRowCol and RowColToCharIndex

The last 2 are the only things that actually have some functionality. Is 
really everyone using them?
Is everyone treating their text as one long text (contains all the 
lines) and need to know the BytePos of a XY pos?
Isn't it much easier to treat the text as individual lines? Actually I 
heard quite a few times people ask, how they do the reverse in TMemo, 
and here we are TSynEdit already dealing in XY, and everyone needs the 
BytPos..

I really do not understand it....






More information about the Lazarus mailing list