[Lazarus] Converting a component package Delphi->Lazarus using built-in converter?

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Jun 9 17:50:43 CEST 2018


On Fri, 08 Jun 2018 20:08:02 +0200
Bo Berglund via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> On Fri, 8 Jun 2018 10:17:00 -0700 (MST), leledumbo via Lazarus
>[...]
> procedure TEasyListView.DoColumnSort;
> var
>   SortStyle: TColumnSortStyle;
> begin
>   if ViewStyle <> vsReport then Exit;
>   if not FColumnSorting then Exit;
>   case ColumnSortStyle[ActiveSortColumn] of
>     ssString: CustomSort(@SortByStringProc, FSortColumn);
>     ssInteger: CustomSort(@SortByIntegerProc, FSortColumn);
>     ssFloat: CustomSort(@SortByFloatProc, FSortColumn);
>     ssImageIndex: CustomSort(@SortByImageIndexProc, FSortColumn);
>     ssCustom: begin
>       if Assigned(FOnColumnSortCompare) then
>       begin
>         UColumnSortCompare := FOnColumnSortCompare;
>         CustomSort(@SortByCustomProc, FSortColumn);
>         UColumnSortCompare := nil;
>       end;
>     end;
>     ssNone: ; // Do nothing
>   end;
> end;
> 
> On every line mentioning CustomSort there is an error:
> Error: Identifier not found "CustomSort"
> 
> CustomSort is an identifier in the parent TListView unless I am
> mistaken. This error never appeared in Delphi...
> 
> Any ideas?

TCustomListView.CustomSort exists in LCL as well.
Check the declaration of SortByStringProc:

function SortByStringProc(Item1, Item2: TListItem;
AOptionalParam: PtrInt): Integer; stdcall;

Mattias


More information about the Lazarus mailing list