I'm getting the following mysterious run-time error:
CODE
var
cellcontent : WideString;
index : Integer;
begin
With Frame31.NextGrid1 do begin
index := 0;
cellcontent := Frame21.NextGrid1.Columns[index].Header.Caption;
//OK ShowMessage(cellcontent);
//Project Project1.exe raised exception
//class EVariantTypeCastError with message
//'Could not convert variant of type (String) into type (Boolean)'.
CellsByName['parametre',index] := cellcontent;
end;
end;
cellcontent : WideString;
index : Integer;
begin
With Frame31.NextGrid1 do begin
index := 0;
cellcontent := Frame21.NextGrid1.Columns[index].Header.Caption;
//OK ShowMessage(cellcontent);
//Project Project1.exe raised exception
//class EVariantTypeCastError with message
//'Could not convert variant of type (String) into type (Boolean)'.
CellsByName['parametre',index] := cellcontent;
end;
end;
Since "cellcontent" is a WideString, and that both Columns[].Header.Caption and CellsByName use WideStrings, I don't understand where this error comes from. Any idea?
Thank you.