[Lazarus] ToDoListLaz

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Feb 3 05:56:56 CET 2011


I've encounterd several problems with the TodoList form in package 
ToDoListLaz, SVN trunk and fixes_0_9_30, on Win7. No docking support 
installed, if this matters.

On the first invocation of menu "View|ToDo list" an AV occurs, I suspect 
that the form has not been created. Further tries hang the IDE, so that 
it only can be killed. Can somebody confirm or help in fixing my 
possibly broken configuration?

The columns deserve some beautification, in detail filenames should be 
presented in a reasonable form (rightmost part is essential), and line 
numbers should be right-aligned. It also should be possible to sort the 
columns, e.g. by file, where filenames and linnumbers are sorted 
together. The customized column layout should be stored, somehow. This 
is what I want to add, and what reveals problems with TListView.

I understand that the behaviour of the platform specific ListView widget 
imposes limits on the implementation of such features, so that e.g. 
owner draw and sorting has to be used. Another solution could use a 
TStringGrid instead, with no special widgetset dependencies.

Sorting a TListView currently is flawed, because the list is sorted 
twice. The first sort uses CompareItems, where a customized sorting can 
be implemented using an OnCompare handler. The second sort occurs in the 
widget, where the Win32 widgetset uses a different compare function. I 
don't know how to fix this in a platform independent way; a simple 
solution would never call the widget specific sorting, removing e.g. 
ascending/descending sorting and user feedback about the sorted column 
and sort order.


What's the chance that TListView is improved, so that it allows to use 
more of the widget specific features? Or should I better try to use a 
TStringGrid instead?

How can the configuration of the ToDo list be stored in the IDE 
configuration?

DoDi





More information about the Lazarus mailing list