cocoa: invalidating tableview data after changing sort column info. #35642

git-svn-id: trunk@61298 -
This commit is contained in:
dmitry 2019-05-28 12:29:46 +00:00
parent 80def7d927
commit e80efec72a

View File

@ -196,9 +196,9 @@ type
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
(*class procedure SetSort(const ALV: TCustomListView; const {%H-}AType: TSortType; const {%H-}AColumn: Integer;
class procedure SetSort(const ALV: TCustomListView; const {%H-}AType: TSortType; const {%H-}AColumn: Integer;
const {%H-}ASortDirection: TSortDirection); override;
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
(*class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
class procedure SetViewStyle(const ALV: TCustomListView; const AValue: TViewStyle); override;*)
end;
@ -1469,6 +1469,25 @@ begin
{$endif}
end;
class procedure TCocoaWSCustomListView.SetSort(const ALV: TCustomListView;
const AType: TSortType; const AColumn: Integer;
const ASortDirection: TSortDirection);
var
lTableLV: TCocoaTableListView;
lNSColumn: NSTableColumn;
begin
if not CheckColumnParams(lTableLV, lNSColumn, ALV, AColumn) then Exit;
lTableLV.reloadData();
{ //todo:
lNSColumn.setSortDescriptorPrototype(
NSSortDescriptor.sortDescriptorWithKey_ascending_selector(
NSSTR('none'),
ASortDirection=sdAscending,
objcselector('none:')
)
);}
end;
{ TCocoaWSProgressBar }
class function TCocoaWSProgressBar.CreateHandle(const AWinControl: TWinControl;