trichview.com

trichview.support




Re: GetCurrentItemEx List Index out of bounds


Return to index


Author

Message

shmp

Posted: 02/03/2004 18:19:58


Try to add format  in your 'create new document' procedure.


Regards.

Henry.


"Jonas Bilinkevicius" <jon@mail.lt> wrote in message

news:401fbc07$1@support.torry.net...

> When i try to create new document (Action New) this code gives the error

> "List Index out of bounds (-1)". The error appears in the line:

> vEditor.GetCurrentItemEx(TRVTableItemInfo, rve, item)

>

> I think the error appears because of parameter item as in new document

there

> aren't any items. I think it is needed to check if there are any objects

in

> a document before using GetCurrentItemEx procedure. How to do that?

>

> 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);

>

>

>

>





Powered by ABC Amber Outlook Express Converter