bug and fix
Posted: Thu Apr 03, 2008 12:23 am
In SclRView SetCurPage(PageNo : Integer)
Line# 8297
If you click on the page in SRVPageScroll1 (in the left bar) and nothing is loaded into the document, it GPFs.
You need to add a check:
if (DrawItemNo < 0) then exit;
after getting DrawItemNo and before looking up DrawItems[DrawItemNo]
eg:
if (checkRealTimeMode) or (PageNo < 1) or (PageNo > FPageCount) then exit;
DrawItemNo := PageStartDrawItemNo[PageNo - 1];
if (DrawItemNo < 0) then exit;
ItemNo := FRichViewEdit.RVData.DrawItems[DrawItemNo].ItemNo;
. . .
Same thing in Item2DrawItem (and probably several other places)
I'm trying to load a file into my app. It is loading into RVE, but for some reason it's not displaying. Something in my code is probably clearing things after it gets loaded. In any case, stuff isn't in a clean state, and there's one thing that's trying to select an item in the RVE that doesn't exist. So it's getting these errors that normally wouldn't be arising.
-David
Line# 8297
If you click on the page in SRVPageScroll1 (in the left bar) and nothing is loaded into the document, it GPFs.
You need to add a check:
if (DrawItemNo < 0) then exit;
after getting DrawItemNo and before looking up DrawItems[DrawItemNo]
eg:
if (checkRealTimeMode) or (PageNo < 1) or (PageNo > FPageCount) then exit;
DrawItemNo := PageStartDrawItemNo[PageNo - 1];
if (DrawItemNo < 0) then exit;
ItemNo := FRichViewEdit.RVData.DrawItems[DrawItemNo].ItemNo;
. . .
Same thing in Item2DrawItem (and probably several other places)
I'm trying to load a file into my app. It is loading into RVE, but for some reason it's not displaying. Something in my code is probably clearing things after it gets loaded. In any case, stuff isn't in a clean state, and there's one thing that's trying to select an item in the RVE that doesn't exist. So it's getting these errors that normally wouldn't be arising.
-David