Looping through RVData items -> access violation

General TRichView support forum. Please post your questions here
Post Reply
alexro
Posts: 8
Joined: Sun Mar 26, 2006 9:10 pm

Looping through RVData items -> access violation

Post by alexro »

What's wrong with the following:

for I:= 0 to RVData.ItemCount - 1 do
begin
if RVData.GetItemStyle(I) >= 0 then
begin
Strings.AddObject(RVData.GetItemText(I), RVData.GetItem(I));
end
end;

So, upon clicking a toolbar button, I'm building a list of strings with pointers to the accompanying RVData items. After that I always get access violation in CRVFData unit at lines 4189-4190:

if not MouseMoveHotItem(HOffs,VOffs) then
SetCursor(GetNormalCursor);
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This code must not cause problems because it does not modify document.
I am not sure what value RVData variable has, though.

May be this error occurs for some another reason, for example, document is not formatted?
Post Reply