invalid caret position
Posted: Wed Oct 05, 2005 4:41 pm
hi Sergey,
I was working with list styles and invalid caret position exception appears. I have found that this exception raises when marker has one item with zero size... Please look at TRVEditRVData.OnChangeCaretLine.
There are CaretOffs variable (which was filled from constant VARGE_VALUE = 100000) and variables - First and Last. There is GetScreenLineBounds function which initializes First and Last... In this case the function returns same First as Last.
After that there is a decision wether item is rvsListMarker - result is True - so First is incremented... Following for cycle (for i := First to Last do) which should set CaretOffs not pass trough...
So in TRVEditRVData.ChangeCaret where is the decision wether exception will be risen {if (CaretOffs<0) or (CaretOffs>=CharEnds.Count) then} is clear what will follow... (CaretOffs = 100000)
i hope this will help you...
I was working with list styles and invalid caret position exception appears. I have found that this exception raises when marker has one item with zero size... Please look at TRVEditRVData.OnChangeCaretLine.
There are CaretOffs variable (which was filled from constant VARGE_VALUE = 100000) and variables - First and Last. There is GetScreenLineBounds function which initializes First and Last... In this case the function returns same First as Last.
After that there is a decision wether item is rvsListMarker - result is True - so First is incremented... Following for cycle (for i := First to Last do) which should set CaretOffs not pass trough...
So in TRVEditRVData.ChangeCaret where is the decision wether exception will be risen {if (CaretOffs<0) or (CaretOffs>=CharEnds.Count) then} is clear what will follow... (CaretOffs = 100000)
i hope this will help you...