trichview.com

trichview.support




Re: GetCurrentItemEx List Index out of bounds


Return to index


Author

Message

Jonas Bilinkevicius

Posted: 02/04/2004 23:22:50


The situation is that I use the code in Event OnCaretMove and when


Clear procedure is called there appears an error at line:


vEditor.GetCurrentItemEx(TRVTableItemInfo, rve, item)




Above I use the code which helps to read some table properties.


When user moves a cursor from one table to another my code starts working.




Everything would be ok but when Clear procedure is being called there

appears the error.




How to avoid this? Maybe I should move the code into other event?


On the other hand I think OnCaretMove suits there best.




procedure.....rvEditCaretMove(Sender: TObject);

var

  item: TCustomRVItemInfo;

  table: TRVTableItemInfo;

  rve: TCustomRichViewEdit;

begin

  if not vEditor.CanChange or  not

vEditor.GetCurrentItemEx(TRVTableItemInfo, rve, item) then

    exit;

  table := TRVTableItemInfo(item);

  ItemNo := rve.GetItemNo(table);


//Reading table properties







Powered by ABC Amber Outlook Express Converter