[fpc-pascal] property of an array
Jeremy Cowgar
jeremy at cowgar.com
Sun Jan 4 01:04:40 CET 2009
I am trying to make this work:
type
StringArray : array of String;
... later in code ...
procedure SetColumnNames(names : StringArray);
property ColumnNames : StringArray write SetColumnNames;
... later in code ...
procedure TMyObject.SetColumnNames(names : StringArray);
begin
... code to set column names ...
end;
... later in code ...
myObj.ColumnNames := [ 'Id', 'Name', 'Age' ];
I get an error on the above line:
Error: Ordinal expression expected
Any thoughts? Thanks!
Jeremy
More information about the fpc-pascal
mailing list