On Sun, Jan 20, 2013 at 9:39 AM, Staffan Tylen <staffan.tylen@gmail.com> wrote:

Have you looked through the documentation on LvFullRow, LvItem, and LvSubitem?  LvFullRow came about though my desire to insert a new list-view item in one method invocation.  However, my main design goal was to be able to specify all bits of data that the list-view supports.

Yes, I've been through them all but couldn't see that they would address this particular task.

No, there isn't currently anything that would address the task.  There is still a missing method.

One idea I have would be something like this:

do i = 2 to data~items          -- loop thru all data arrays
   lv~insertFullRow(.LvFullRow~fromArray(data[i])) data array as a listview row

ListView::insertFullRow() already exists.  I would just need to add the LvFullRow class method fromArray(...)

LvFullRow objects have a number of things about them that are designed to assist in working with list-views.  The  LvFullRow object can automatically be set as the item data of the list-view item.  Then, the list-view columns can be sorted internally, which makes sorting of list-views with a large number of items much, much faster.

I like this idea.

This would not give you faster insertion of a large number of items though.

Is this regardless whether the lvFullRow object is set as item data or not? (Don't think my English is correct there!)

Setting the LvFullRow object as the item data has no impact on performance.  Rather, it is the fact that a LvFullRow object is made up of a number of other objects, a LvItem object and a LvSubitem object for each column. 

A new list-view method, insertRow() could be added that takes an array as an argument is possible

lv~insertRow(.array, itemData, stringValueForNil)

I think it's important that whatever method is chosen, the stringValueForNil option be included in one way or another.

It could just be the empty string always.

Mark Miesfeld