[Lazarus] TListView review required
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Jul 4 16:46:33 CEST 2011
Max Vlasov schrieb:
> On Mon, Apr 18, 2011 at 10:57 AM, Hans-Peter Diettrich
> <DrDiettrich1 at aol.com> wrote:
>> ATN Vincenct Snijders, Dmitry Boyarintsev, chronos...
>> Mantis #18820, #18898, #18961...
>>
>> The ListView component is in a bad state, and a review of the current item
>> handling is required, before proper solutions can be found. Problems arise
>> with OwnerData and sorting, and at least OwnerData should be made work
>> properly.
>>
>
>
> Is it something related in the process that prevents r31548 from
> compiling on Linux
>
> gtk2wscomctrls.pp(162,43) Error: Identifier not found "TSortDirection"
> gtk2wscomctrls.pp(161,21) Error: There is no method in an ancestor
> class to be overridden: "class TGtk2WSCustomListView.SetSort(const
> TCustomListView,const TSortType,const LongInt,const <erroneous
> type>);"
> gtk2wscomctrls.pp(239,1) Fatal: There were 2 errors compiling module, stopping
> Fatal: Compilation aborted
The widgetsets have to be updated accordingly, once we agree about
implementing sorting in general. I'm only experienced with the Win32
widgets, and don't know how other widgetsets support ListViews and
sorting at all.
There exist two general approaches WRT to the item lists:
1) either have everything stored and managed by the widget (Delphi),
2) or do everything in the LCL, leaving the widgets in OwnerData mode.
The current LCL implementation tries to do both at the same time, with
immense trouble in keeping both lists (LCL and widget) in sync. Delphi
manages this more clever, using [1] and a temporary list of items before
or between eventually required RecreateWnd calls. The "virtual" approach
[2] might be more appropriate with dumb widgetsets, which herefore only
must allow for an virtual (OwnerData) mode. Then a true OwnerData
control could be implemented as the LCL base class, with a derived class
that also implements an item list. Then all additional features can be
implemented in the LCL, the widgetsets must not be touched any more.
DoDi
More information about the Lazarus
mailing list