Bounds checking
Howzit,
Added the following code because AV's occurring.
function TppJvCustomInspector.GetVisibleItems(const I: Integer):
TppJvCustomInspectorItem;
begin
if (I < 0) {Added}or (I >= FVisible.Count) {/Added}then
Result := nil
else
Result := TppJvCustomInspectorItem(FVisible.Objects[I]);
end;
function TppJvCustomInspector.IdxToY(const Index: Integer): Integer;
var
I: Integer;
begin
Result := 0;
for I := 0 to Pred(Index) do
{Added}if Assigned(VisibleItems[I]) then {/Added}
Inc(Result, VisibleItems[I].Height);
end;
I can't replicate the AV's, but happened when i had a barcode and a 2D
barcode selected and tried to de-select them by clickon on a blank area of
the report. I could not do anything from this point - not even close the
designer.
Regards,
Gilbert
Added the following code because AV's occurring.
function TppJvCustomInspector.GetVisibleItems(const I: Integer):
TppJvCustomInspectorItem;
begin
if (I < 0) {Added}or (I >= FVisible.Count) {/Added}then
Result := nil
else
Result := TppJvCustomInspectorItem(FVisible.Objects[I]);
end;
function TppJvCustomInspector.IdxToY(const Index: Integer): Integer;
var
I: Integer;
begin
Result := 0;
for I := 0 to Pred(Index) do
{Added}if Assigned(VisibleItems[I]) then {/Added}
Inc(Result, VisibleItems[I].Height);
end;
I can't replicate the AV's, but happened when i had a barcode and a 2D
barcode selected and tried to de-select them by clickon on a blank area of
the report. I could not do anything from this point - not even close the
designer.
Regards,
Gilbert
This discussion has been closed.