I'm trying to use the Refactor - Extract method on this code block.
if vntIP.GetProperty('IPXLCStTp') = '4' then
begin
pIEnumIPXLCStat := IUnknown(vntIP.IPXLCStats._NewEnum) as IEnumVariant;
Assert(Assigned(pIEnumIPXLCStat));
pIEnumIPXLCStat.Reset();
pIEnumIPXLCStat.Next(1, vntIPXLCStat, Cardinal(intIPXLCStatCount));
while (intIPXLCStatCount = 1) do
begin
if vntIPXLCStat.GetProperty('IPXLCStTp') = '4' then
begin
strTmp := vntIPXLCStat.GetProperty('LCStDt');
if ((vntIP.GetProperty('IPTp') = '1') or (vntIP.GetProperty('IPTp')
= '2')) and
(vntIPXLCStat.GetProperty('IPXLCStChngRsnTp') = '5') then
begin
aCustomer.AddImportant(CUSTOMER_COMPLETED_BY_MERGER + SPACE +
strTmp);
end
else
begin
aCustomer.AddImportant(CUSTOMER_COMPLETED + SPACE + strTmp);
end;
end;
VariantClear(vntIPXLCStat);
pIEnumIPXLCStat.Next(1, vntIPXLCStat, Cardinal(intIPXLCStatCount));
end;
end;
But I get this error message:
"Unable to cast object of type 'Borland.Delphi.VariantType' to type
'Borland.Delphi.ProcedureType'."
Does anyone know why this message pops up?
//Jesper
_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi