Page 1 of 1

Looping through RVData items -> access violation

Posted: Sun Apr 02, 2006 11:47 am
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);

Posted: Sun Apr 02, 2006 8:09 pm
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?